User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,588 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,661 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 3137 | Replies: 5
Reply
Join Date: Dec 2004
Location: Prince Rupert
Posts: 4
Reputation: AllenN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AllenN's Avatar
AllenN AllenN is offline Offline
Newbie Poster

Pause

  #1  
Dec 1st, 2004
New boy -easy question - doing a tutorial and the compile and run work but the only time I see the program partially running is when I put in a cin - I have looked but I cannot find how to put in a pause and allow me to see the program on the screen - presently it just goes too fast to see the output.
Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 3,449
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 16
Solved Threads: 138
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Pause

  #2  
Dec 1st, 2004
Look here and here.
Reply With Quote  
Join Date: Aug 2004
Location: India
Posts: 40
Reputation: varunrathi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
varunrathi's Avatar
varunrathi varunrathi is offline Offline
Light Poster

Solution Re: Pause

  #3  
Dec 2nd, 2004
IT DEPENDS UPON WHICH C++ U R USING
IF U R USING TURBO C++ THEN THE
getch();
COMMAND WOULD HELP U TO HOLD THE SCREEN TILL U PRESS A KEY

FOR DEV C++ I THINK IT IS
system("pause")
but i`m not sure about it
try it.
good luck
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,394
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 172
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: Pause

  #4  
Dec 2nd, 2004
for C

getchar(): // wait, not totally portable

for C++

cin.get(); // wait

Caveat, if a lose return is floating about, like after an input you might have to double line it.
May 'the Google' be with you!
Reply With Quote  
Join Date: Apr 2004
Posts: 3,449
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 16
Solved Threads: 138
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Pause

  #5  
Dec 2nd, 2004
Originally Posted by vegaseat
getchar(): // wait, not totally portable
What is not portable about getchar?
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,394
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 172
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Help Re: Pause

  #6  
Dec 2nd, 2004
Originally Posted by Dave Sinkula
What is not portable about getchar?
Sorry Dave,
I am getting old. Got it confused with getch(). The C function getchar() should be totally portable.
May 'the Google' be with you!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 11:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC