I was refreshing myself with C++ today, and I wrote a hello world .cpp program using notepad++, then compiled it using g++. The executable, when called from the windows command prompt, doesn't run, but is still open by the command prompt and I don't know why this is happening. I also tried using gcc to compile a C program and it worked fine. I installed both gcc and g++ using MinGW on Windows 8. I've checked the path variables, I've reinstalled g++ using MinGW, and I've restarted the computer all to no avail. The code is shown below. Thanks for all your help!
#include <iostream>
int main(){
std::cout<<"Hello World";
return 0;
}
The command I used to compile the .exe is:
g++ -o my_output_name my_input_file.cpp
When "my_output_name" is typed into the command prompt, the little blinky cursor jumps a line, like it's going to write out "Hello World!" but never does and just hangs up there.