-
Dev-C++ 4 woes
Alright, i've got a project with headers and such written by me that i'd like to compile and run. When i compile the project i get 0 errors, yet when i run it, a console window pops up and immediately destroys itself even though there are sections of user input.
Please give me some idea of what the problem is and how to fix it.
-
Use the system("PAUSE"); command*type just like that, with the ( ), " ", and the ;* Just before the return 0;.
-
>Use the system("PAUSE"); command
He said that the program takes user input, so if it's not stopping for that then system ( "PAUSE" ); won't help much. I've never used Dev C++, but it should have some kind of debugger that lets you step through code. You can find what is causing the problem that way.
-Prelude
-
Dev-C++ has a debugger, and this is what I mean:
Code:
#include <iostream.h>
#include "anyheadersyouwant.h"
char name[20];
int main()
{
cout << "Hi there!\n"
"Please tell me your name:\n";
cin >> name;
cout << "Thank You "<<name<<". Please come again.\n";
system("PAUSE");
return 0;
}
-
i figured out the problem.. i just hadn't set the include directory properly and it was using a different main.cpp file as the main file... strange, but it's fine now.
thanks for trying to help everyone.