C++ School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C++ Expert!

Join 307,038 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,220 people online right now. Registration is fast and FREE... Join Now!




Holding The Execution Window Open

5 Pages V « < 3 4 5  

Holding The Execution Window Open, Title 2: How do I pause for input?

no2pencil

RE: Holding The Execution Window Open

25 Aug, 2009 - 09:18 PM
Post #81

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,491



Thanked: 303 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
QUOTE(apw5020 @ 30 Jul, 2009 - 02:37 PM) *

I think cin.get() is sufficient.

I disagree. Since this is posted under C & C++, & I prefer to write in C, the cin function does us C coders no good.

I still say the best way is to run your code form the command line itself, therefor you don't need all this tacky code to eat up extra cpu usage just for visual verification of standard out. If you want to read standard out, launch your program where it can utilize standard out smile.gif
User is online!Profile CardPM
+Quote Post

apw5020

RE: Holding The Execution Window Open

26 Aug, 2009 - 03:09 PM
Post #82

D.I.C Addict
****

Joined: 26 Mar, 2009
Posts: 577



Thanked: 58 times
My Contributions
QUOTE(no2pencil @ 26 Aug, 2009 - 01:18 AM) *

QUOTE(apw5020 @ 30 Jul, 2009 - 02:37 PM) *

I think cin.get() is sufficient.

I disagree. Since this is posted under C & C++, & I prefer to write in C, the cin function does us C coders no good.

I still say the best way is to run your code form the command line itself, therefor you don't need all this tacky code to eat up extra cpu usage just for visual verification of standard out. If you want to read standard out, launch your program where it can utilize standard out smile.gif


Is it not implied that cin only applies to C++? I guess beginners wouldn't know this, but most others should. If it makes you happy, I will modify my original statement: cin.get() is sufficient in C++.

This post has been edited by apw5020: 26 Aug, 2009 - 03:10 PM
User is offlineProfile CardPM
+Quote Post

ImaSexy

RE: Holding The Execution Window Open

27 Aug, 2009 - 10:40 PM
Post #83

D.I.C Addict
Group Icon

Joined: 9 Jun, 2009
Posts: 911



Thanked: 63 times
Dream Kudos: 125
My Contributions
I dont know why everybody trys to disagree with everyones method, obviously cin.get() along with clearing the buffer before works like a champ, any other way is just making being stuborn. If it is really that big of an issue then just run it from the dos window #2pencil said. But I agree cin.get() is the most sufficent way of doing the increditable task of pausing the dos window lol
User is offlineProfile CardPM
+Quote Post

poncho4all

RE: Holding The Execution Window Open

2 Sep, 2009 - 10:21 PM
Post #84

Debugging the Future!
Group Icon

Joined: 15 Jul, 2009
Posts: 1,177



Thanked: 98 times
Dream Kudos: 75
My Contributions
Let me say i agree that cin.get() is the best way to go.

And that this is a really weird thread.
User is online!Profile CardPM
+Quote Post

mono15591

RE: Holding The Execution Window Open

14 Sep, 2009 - 10:26 AM
Post #85

D.I.C Regular
***

Joined: 5 Nov, 2008
Posts: 352



Thanked: 11 times
My Contributions
Oops
thought this was only three pages long


This post has been edited by mono15591: 14 Sep, 2009 - 10:27 AM
User is offlineProfile CardPM
+Quote Post

poncho4all

RE: Holding The Execution Window Open

14 Sep, 2009 - 09:18 PM
Post #86

Debugging the Future!
Group Icon

Joined: 15 Jul, 2009
Posts: 1,177



Thanked: 98 times
Dream Kudos: 75
My Contributions
QUOTE(mono15591 @ 14 Sep, 2009 - 10:26 AM) *

Oops
thought this was only three pages long

ok.....?
would it be posible to know what you wrote?

User is online!Profile CardPM
+Quote Post

carltech

RE: Holding The Execution Window Open

15 Sep, 2009 - 03:59 PM
Post #87

DicKing
Group Icon

Joined: 19 Oct, 2007
Posts: 691



Thanked: 12 times
Dream Kudos: 25
My Contributions
*in mocking tone* umm...how come I can't see my program thingy???
This is really one of the most elementary parts of programming in general - being able to see your program run and finish.
User is offlineProfile CardPM
+Quote Post

nightwolf613

RE: Holding The Execution Window Open

16 Sep, 2009 - 02:12 PM
Post #88

New D.I.C Head
*

Joined: 15 Sep, 2009
Posts: 15


My Contributions
As someone who is just learning C++, all I wanted to do was hold the window open long enough to see my work after executing it. Before it opened and closed so fast you couldn't tell if anything was there.

I could see how in other programs pausing it would be a hinderance. But for a beginner I found this to be very useful. Thanks!
User is offlineProfile CardPM
+Quote Post

5 Pages V « < 3 4 5
Reply to this topicStart new topic

Time is now: 11/21/09 08:49AM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month