-
this is kinda embarrasing for me, well maybe not
i havent touched c++ in over 6 months
and today i got my laptop (YUMMMMM)
i am cracking away at c++ and on the mission to learn that damn mfc n open"G"
i made a little proggie..
but when i run the program
when the code is done the dos window goes BOOM and dissappears..
ok now to the point
there is a checkbox somewhere in the visual c++ IDE menu
that i check/uncheck so that damn window stays til i press a button
i looked EVERYwhere for it i coudn't find it
anyone know what menu its under?
its something like "console window" with a check mark beside it...
thank you
-
I can't find your checkbox, but I have the same problem, what I do is this, in my main procedure I put this
Code:
int main()
{
// /**/ ensures line is uncommented even if it is in a block comment
/**/ int retval;
//Place your code here
/**/ cin >> retval;
/**/ return retval;
}
that way the program waits for me to input a value before ending, and so the window doesn't disapear.
It's not great but it'll do until someone finds your checkbox.
-
make sure that u have this as part of ur libary
Code:
#include <iostream>
#include <stdlib.h>
put this code where u want the program to wait
GL :eek:
I had the same problem:D
-
OpenGL rawks. Although I'd say use GLUT not MFC. Actually....check out http://ngl.sourceforge.net for something I've been playing with recently.
-
Try Project Options->Debug, it might be there.
-
I like using
Code:
cout << "Press any key to continue";
getch();
but you have to include conio.h