-
Dev-C++ project opptions
Whe i open a new project for dev-c++, i can open a windows app, consol app, DLL, static liberary, or empty project. What is the difference?
Also, how can i keep a consol app open? I tried the
cin.get();
that is just befor the return 0, but it doesnt work at all.
-
Update
Actually, if i choose a windows app, the above code works, but if i choos a consol app, it doesnt.
-
If there is something in the input stream when you use cin.get();(like an enter from a cin) you have to put two consecutive cin.get();'s. Works for me anyways.
-
Here is how to keep it open and i do use Dev c++.
Code:
#include <iostream>
#include <conio.h> //header for getch() keeps console open
using namespace std;
int main ()
{
cout <<"HEllo";
getch();// closes console when user presses any key.
return0:
}
hope it works
-
getch(); is not a standard function.
-
Does that really matter? He just wants to keep the console from closing!
?!?
-
I never said that it doesn't work or that he shouldn't use it. Just letting him know.
-
noted
All i want is to get it to work.
-
Well, anyone know what the difference between a windows app, consol app, DLL, static liberary, or empty project?
-
the windows app is for graphical applications. They look like the programs you run on your computer. The console app runs in dos and doesnt require and graphics or anything. Empty project lets you add different types of files to your "project" i recommened if you are new just use empty project and add a source file. Just type all your work in there.
-
So, just start simple, and learn the basics first.