Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-12-2003, 05:02 PM   #1
Member (9 bit)
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 363
Send a message via AIM to coolcps
Some quick help with Bloodshed Dev C++

Hi, I am doing the C++ tutorial at www.cplusplus.com and I have a quick question on it. On the very first part, where you simply make the program that says Hello World :

// my first program in C++

#include

int main ()
{
cout << "Hello World!";
return 0;
}

After you compile it, then execute it, is it suppose to just flash up on the screen really quick? If so, what paramaters do I change so I can actually see the "program". Thank you for your help.
coolcps is offline   Reply With Quote
Old 07-12-2003, 09:18 PM   #2
Security Dude
Staff
 
kstatefan40's Avatar
 
Join Date: Jun 2003
Location: Derby, Kansas
Posts: 999
Send a message via AIM to kstatefan40 Send a message via MSN to kstatefan40 Send a message via Yahoo to kstatefan40 Send a message via Skype™ to kstatefan40
I was just going to post the same question. It pops up in a Dos window and goes for about a second, not long enough for you to read it. I am running XP. Does anyone know what is wrong?
THANKS,
kstatefan40 is offline   Reply With Quote
Old 07-13-2003, 07:34 AM   #3
Member (11 bit)
 
mikeL's Avatar
 
Join Date: Nov 1999
Location: Northeast, Michigan
Posts: 1,063
this should help with your questions, or at least point you in the right direction.

HTH and happy coding

http://forums.devshed.com/archive/42/2002/11/1/46388
mikeL is offline   Reply With Quote
Old 07-13-2003, 12:50 PM   #4
Security Dude
Staff
 
kstatefan40's Avatar
 
Join Date: Jun 2003
Location: Derby, Kansas
Posts: 999
Send a message via AIM to kstatefan40 Send a message via MSN to kstatefan40 Send a message via Yahoo to kstatefan40 Send a message via Skype™ to kstatefan40
Thanks alot! it works great now!
kstatefan40 is offline   Reply With Quote
Old 07-13-2003, 01:34 PM   #5
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Either you can add the System("pause") line, or you can open up a command prompt window and run the program from there. I usually do the latter.
doctorgonzo is offline   Reply With Quote
Old 07-13-2003, 07:01 PM   #6
Member (9 bit)
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 363
Send a message via AIM to coolcps
When I do System("pause"); i get a implicit declaration of function `int System(...)`, how do I make it work and what does htat mean? Thanx.
coolcps is offline   Reply With Quote
Old 07-14-2003, 08:07 AM   #7
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
C++ is case sensitive, so it should be lowercase system("pause"). I am just in the habit of capitalizing things, my bad.

Also, make sure you put #include at the top of your source file.
doctorgonzo is offline   Reply With Quote
Old 07-14-2003, 05:29 PM   #8
Member (9 bit)
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 363
Send a message via AIM to coolcps
It now works. THANK YOU VERY MUCH
coolcps is offline   Reply With Quote
Old 07-21-2003, 02:49 PM   #9
Member (8 bit)
 
bell_kicks's Avatar
 
Join Date: Dec 2002
Posts: 186
i think there must be a lot of people tryin to start programming cos i just came on the forum wanting to ask the exact same question??!!!**
bell_kicks is offline   Reply With Quote
Old 07-21-2003, 08:45 PM   #10
Member (10 bit)
 
Join Date: Nov 2002
Location: Champaign, IL
Posts: 611
Send a message via AIM to David14259
I encountered this same problem when I first started programming in C++ (about a year and a half ago). I fixed it with a simple cin statement at the end of the program.

char a;

cout<<"Press a key to Exit";

cin>>a;
David14259 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:03 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2