-
Question with compiling
I have the Dev-C++ compiler, using windows Vista if that helps. Whenever I try compiling, it will do fine but when the window comes up to show my program, it closes instantly.
Code:
#include <iostream>
int main()
{
std::cout << "hello\n";
return 0;
}
I just started using C++, and I can't figure out what is wrong. Any ideas?
-
Read the FAQ please! Use the search please! For the love of god!
-
The program completed, it did its job and closed. You need to pause it if you wanted it to stay open or await your input to close.
Code:
#include <iostream>
int main()
{
std::cout << "hello\n";
cin.get(); //pause program
return 0;
}