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

Pages: 1-

C++ Help

Name: CandleJack 2008-04-11 1:18

Hey /prog/, I am writing up a program in C++ and for some reason I keep getting an error.
(part of my code)
char x[51];

cin<<x;

if(x=="^Z")
{
//etc etc

And it keeps giving me an error, I have tried single quotes, double, x==('^', 'Z', '\0'), and many more.

Really, all I need is for it to make the program respond to the user pressing Ctrl + Z then hitting enter.

Name: Anonymous 2008-04-11 1:34

Check for an EOF on your very well-named variable 'x'. Also it's cin >> x. << operator is for cout. And unless you must use a char array, use a string, FFS it's Sepples not C. If that's the only use you have for x giving it 51 chars is retarded.

Name: Anonymous 2008-04-11 1:36

(I should have said check for EOF on the stream actually)

while( cin >> x)

etc.

Name: Anonymous 2009-02-25 7:34


Check and a cure   for many runtime   problems At least   once actual figures.

Name: Anonymous 2009-03-06 5:58

Also what are these   proper tools you.

Name: Anonymous 2009-08-16 22:34

Lain.

Name: Sgt.Kabukiman 2012-05-21 16:15

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: Anonymous 2012-05-21 18:02

Rei.

Name: Anonymous 2012-06-05 4:56

FUCKING DUBZ

Name: Anonymous 2012-06-05 7:35

>>1
Dipshit. If you use a char array, use strcmp. Elseway use string.

Name: Anonymous 2012-06-05 10:39

>>12
Elseway
eat a bag of dicks

Name: Anonymous 2012-06-05 16:43

Lain.

Name: Anonymous 2012-06-05 19:49

what the fuck is going on in here?

Name: Anonymous 2013-01-19 23:45

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

Name: Anonymous 2013-09-01 14:01



Assuming the axiom of choice, addition of infinite cardinal numbers is easy. If either κ or μ is infinite, then


   
     κ + μ = max(κ, μ)

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