Hi,
I hope someone can help me as I've spent the last 2 days trawling the internet for a solution but to no avail.
I am very much a beginner and starting out on my C++ coding education by following online tutorials. I've already overcome a few obstacles by searching online but can't find a solution to this problem or explanation.
So I installed MinGW and all of its relevant elements on my Windows 8. I create the usual simple code to print the words "Hello World" which is one of the simplest tasks I know.
I created the helloworld.cpp file using the g++ command and then the next instruction is to type a.out to execute the a.exe file that was created but when I type "a.out" in the correct directory it says:
"a.out is not recognized as an internal or external command, operable program or batch file"
Searching online, I tried everything that people suggested; typing ./a.out , editing path environment variables etc but nothing seems to work. (I also get a message saying "." is not recognized as an internal or external command, operable program or batch file when I type ./a.out)
I then today accidentally typed "a,out" with a comma instead of full stop(period) and it printed "Hello World" in my command prompt.
So my questions are;
- why doesn't a.out command work? Do i need to fix this?
- why is "." not recognized when I type ./a.out?
- why did a,out print Hello World on my command prompt?
I'd be grateful for anyone's input to help me resolve this issue and understand why it has occurred so that I can move forward(it's very frustrating).
Thank you for your time in advance,
Mitch