Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ file name with space causes error in Visual Studio Code #132890

Closed
Supriyo016 opened this issue Sep 10, 2021 · 2 comments
Closed

C++ file name with space causes error in Visual Studio Code #132890

Supriyo016 opened this issue Sep 10, 2021 · 2 comments
Assignees

Comments

@Supriyo016
Copy link

When I write a C++ program with the file name Hello World.cpp in Visual Studio Code I got some errors:

#include
using namespace std;
int main()
{
cout<<"Hello World!!!"<<endl;

return 0;
}
Output:-
g++.exe: error: Hello: No such file or directory
g++.exe: error: World.cpp: No such file or directory
g++.exe: error: World: No such file or directory
g++.exe: fatal error: no input files
compilation terminated.

But when I rename the file without space like HelloWorld.cpp, then I did not get any type of error. And I use the latest updated Visual Studio Code and MingW compiler.

But I wanted to use filename with space. How do I resolve this problem?
image

@lramos15
Copy link
Member

Try placing quotes around the file name in your terminal.

@lramos15 lramos15 self-assigned this Sep 13, 2021
@lramos15
Copy link
Member

Closing due to lack of update

@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants