Ark wrote:
zxy3cpn wrote:
Rather than passing the full path to g++ once you find it, it's probably easier to just change to that directory and run g++ from there. That way, you'll keep the executable and the source in the same directory. For example, if Windows tells you that Motto.cpp is in C:\Users\me, just do "cd C:\Users\me" first and then run g++ as you did before.
I just did exactly that but I still get the error message for some reason. It keep saying "no such file or directory". I wrote the program on NotePad, could the problem be that I am using a bad text editor that the prompt if failing to recognize? Should I use a different text editor?
There's no problem with the file itself or the text editor. I'm pretty certain of that.
The issue is you need to find out what the default path the compiler you installed looks for source code in is. You should be able to find this out if there's a readme.txt or other documentation in the directory where you installed the compiler. Once you figure this out you can make a "Motto" subdirectory inside the default path directory and put Motto.cpp inside it. Then just type the subdirectory name when you run g++ and it should automatically find and compile all the .cpp files inside.