I want to compile and run source files in Dev-C++ but I fail.
First I write my program and then I save it, but when I press the button compile and run a small box suddenly appeares and disappears ( so fast that I cant read anything) and when I push the run button it says " source file is not compiled. I use windows XP what should I do? here is the program I wanna run:
//include this file for cout
#include %26lt;iostream.h%26gt;
int main() {
//print out the text string, "Hello, World!"
cout %26lt;%26lt; "Hello, World!" %26lt;%26lt; endl;
return 0;
}
How should I compile my program in Dev-C++ ?
You should give it a command to ask for input (like "press any key to quit.") That way it will pause and wait for you to enter some text to continue.
An example would be:
cout %26lt;%26lt; "Hello, World!" %26lt;%26lt; endl;
cin.ignore();
return 0;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment