- Joined
- Mar 13, 2005
- Location
- Austin, Texas
Hi guys, very late to the party, and this looked like an okay thread to ask. I just now started C++ and am trying to do my own hello world program. I am using Dev-C++. So, I compile with no errors, and as it runs it, the box that I believe would have the "hello world" in it shows up but instantly closes before I can read it.
Can anyone help a mega noob here?
This is what I have:
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
Edit:If I try to just "Run" the file instead of compile and run, I get the "source file not compiled error". Not sure if that is helpful or not
Put in a pause just before the
Code:
return 0;
In windows a common way to do this is with:
Code:
system("pause");