Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

cin.get();

Name: Anonymous 2009-03-18 13:24

I just started learning c++.
In the book I'm learning from it doesn't use
cin.get();
yet whenever i don't use it the program closes

am i doing something wrong or has the author not put it there for a reason?

Name: Anonymous 2009-03-18 13:30

>>1
maybe the author assumes your running it from the command line

Name: Anonymous 2009-03-18 13:31

>>2
i am running it from the command line

Name: Anonymous 2009-03-18 13:32

>>3
are you using windows?

Name: Anonymous 2009-03-18 13:33

>>4
yes

Name: Anonymous 2009-03-18 13:35

>>5
there's your problem!
In windows (if i remember correctly), it opens your programs in a different window. Without the cin.get(), it will close it straight away.

Name: Anonymous 2009-03-18 13:36

>>6
Ok thanks. I guess that solves the problem then.

Name: Anonymous 2009-03-18 14:34

Just using a command line prompt might be easier. Windows+r, cmd, then navigate to the program directory and run. Extra points if you use Cygwin instead.

Name: Anonymous 2009-03-18 16:41

>>1-9
I don't know you anymore /prog/.

You've CHANGED.

Name: Barack Obama 2009-03-18 16:44

CHANGE

Name: FrozenVoid 2009-03-18 16:46

>>10
... is now complete.

Name: Anonymous 2009-03-18 16:46

>>9
As the person who helped him i have this to say - The quicker we're done with these stupid and simple questions, the sooner they fuck off and we can talk about abstract bullshite

Name: Anonymous 2009-03-18 17:06

>>12
That's not true.  Look at all the homework threads in the past 2 days.  This guy has made 3 threads already.

Name: Anonymous 2009-03-18 17:51

these /pr/fags really suck at trolling. they think posting stupid homework bullshit and then posting the answer a little bit later pretending to be someone else is clever.

Name: Anonymous 2009-03-18 18:24

>>14

Name: Anonymous 2009-03-18 21:56

>>1-8,12
these posts make me sad:-(

Name: Anonymous 2013-01-19 23:50

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List