Home > Back-end >  Vscode file to compile
Vscode file to compile

Time:01-30

Below is practise folder three available file:
Hello. H
 # # ifndef HELLO_H_ 
# define HELLO_H_
Void the hello ();

# endif//! HELLO_H_

File. The CPP
 # include & lt; Iostream> 
# include "hello. H"
using namespace std;
Void the hello ()
{
Cout & lt; <"Hello." c + + & lt; }

The main function file hello. CPP
 # include & lt; Iostream> 
# include "hello. H"
Int main (int arg c, char * * argv)
{
Hello ();
system("pause");
return 0;
}

Then don't know how to give the configuration a lot of document compilation environment, in the terminal displayed commands to compile but couldn't find the related documents
Command: g + + \ hello. CPP. \ file CPP -o hello
Output:
PS: H \ project \ vscode course \ c + + _course & gt; G + +. \ hello. CPP. \ 'file. CPP -o hello
G + +. Exe: error:. \ hello. CPP: No to the file or directory
G + +. Exe: error:. \ 'file. CPP: No to the file or directory
G + +. Exe: fatal error: no input files

CodePudding user response:

Is the new practise in the working folders folder, use vscode now open the folder, and then the g + + - g hello. CPP file. The CPP -o hello was successful, but I want to know how to configure the environment configuration, more than the vscode configuration file compiling,
  • Related