C++ Beginner Needs Help
#1
Posted 26 March 2005 - 06:20 AM
when i do this:
#include <iostream.h>
int main()
{
cout << "Hello World!\n";
return 0;
}
he will open the .exe and close it immediatly...
how can i fix this?
thanks
#2
Posted 26 March 2005 - 10:46 AM
#include <iostream.h>
using namespace std;
int main()
{
cout << "Hello World!\n";
system("PAUSE"); // will ask user to press any key to exit
return 0;
}
#3
Posted 26 March 2005 - 11:35 AM
and the next question is, why is it in a DOS promt?
in history i had a "windows window" with text in it.
how can i fix this?
( Example: http://www.highor.com/likethis.JPG )
#4
Posted 26 March 2005 - 11:55 AM
#5
Posted 26 March 2005 - 12:50 PM
how can i change the GUI?,
and is there a tutorial or something how to add a textfield ? were you can write in ect..?
and i want to know how i can change my title of the screen
thnx
#6
Posted 30 March 2005 - 03:08 PM
#7
Posted 08 May 2005 - 08:30 PM
#8
Posted 08 May 2005 - 10:33 PM
#9
Posted 08 May 2005 - 11:48 PM
#11
Posted 09 May 2005 - 11:51 PM
Highor, on Mar 26 2005, 10:50 AM, said:
and is there a tutorial or something how to add a textfield ? were you can write in ect..?
<{POST_SNAPBACK}>
I think that for a pretty GUI, you need to learn about MFC (Microsoft Framework Controls) - I think that's what it's called. This isn't the same thing as .NET Framework, but it's the core of the Windows GUI that's available to programmers.
I can tell you with great confidence right now that you should stick with the command line interface for the time being until you get a hold of all the finer details of programming (memory management, data structures, etc). Once you've got those things under control, porting your work over to a GUI is a piece of cake.
#12
Posted 16 May 2005 - 06:10 AM
#13
Posted 05 June 2005 - 10:02 PM
here's a way to keep the console from closing -- basically the best ways are add code that waits for a keypress, or open a command prompt and then call it from within the prompt.
As for going visual, I tried Visual C++ 6 in 24 hours (although I was reading about an "hour" a day and i still haven't managed to finish the book...



Help
Back to top










