Search found 4 matches

by jongooni
Fri Jul 06, 2007 6:39 pm
Forum: C++
Topic: How to check for blank line?
Replies: 5
Views: 3738

THanks, but I don't want to skip blank lines. I want to stop on blank lines and then process what I just read in.
by jongooni
Fri Jul 06, 2007 4:31 pm
Forum: C++
Topic: How to check for blank line?
Replies: 5
Views: 3738

Actually for some reason that doesn't sem to work when I do something like

1
//doesn't see this blank line
2
//doesn't see this blank line
4
by jongooni
Fri Jul 06, 2007 4:23 am
Forum: C++
Topic: How to check for blank line?
Replies: 5
Views: 3738

How to check for blank line?

I'm having trouble figuring out how to read in numbers until I hit a blank line. This is what I have so far, and I've looked into getline and cin and others. bool keep_going = true; string z; int a; while(keep_going){ //stay in while loop until blank line getline(cin, z); //read in line a = z.size()...
by jongooni
Thu Jul 05, 2007 5:46 pm
Forum: C++
Topic: Reading a blank line in c++
Replies: 1
Views: 2071

Reading a blank line in c++

I'm trying to read a blank line for the problem 10033 Interpreter (I've searched and didn't find anything too helpful). The code i have right now is a simple whle loop like this: cin >> j; while(j != '\n'){ //<code> cin>>j; }//end while but it doesn't seem to work. I'm a recent convert from Java, so...

Go to advanced search