Don't know how to compile with the a space in the name of the source code file...

I'm writing my code in simply notepad. I'm very beginner to C++ also. Here is my basic source code....
_______________________________________________
#include <iostream>
using namespace std;

int main()
{
cout << "hello holt/n";
return 0;
}
________________________________________________
Im also saving the file as "June 10th.cpp" (without the double quotes) and try to compile it in cmd with the command "g++ june 10th.cpp -o c++.exe"
Ive taken out the space and tried it without the space and it compiled finely but im just curios on how to compile it with the space. Thanks
Quote the file name (which contains spaces).

g++ -std=c++11 -Wall -Wextra -pedantic-errors "june 10th.cpp" -o c++.exe
That said, you would do well to avoid file names with spaces. There are a lot of tools (mostly old GNU ones) out there that still can't handle them, both on *nix and Windows.
Topic archived. No new replies allowed.