Help! Looping problem.

This is a discussion on Help! Looping problem. within the C++ Programming forums, part of the General Programming Boards category; Why can't I stop the loop even after I put
while ("answer" != 0);
on the answer input I press ...

You could start by getting the input for the poll and then compare the input to a constant and finally increase the correct variable.
Further you could add an error check or a while loop to ensure you get an answer that you want.

are you compiling this as you go? Your compiler should be giving you errors for these, or at least warnings. It would be alot more useful for you if you posted your compiler errors with your code and I helped you understand what they mean.

ohh nevermind... I should make it (answer != "0") instead of ("answer" != 0)..

but Im new to this.. is the one in the quotation mark indicate that it is an input to be compared?

Anything in string literal ("hello world") is a string (C string to be precise). Thus, in the second one, you compare a string literal to an integer. This doesn't make, but unfortunately works due to the nature of C style strings (I hope we get "real" C++ string literals in the future).
The first compares the variable answer to the string literal "0", which is what you want.
That is why it works, and not the first.

Also, since you seem to be new to loops, you should not ask people "how do I do this?". There are a thousand variants, and you cannot learn them all.
Ever heard of flowcharts? Try making one for what you want, then translating that into code. Flowcharts help you build your logic and loops.

As for the output you see in the output window, it's normal and nothing you have to worry about.
Essentially, a pdb file is a file that contains debugging information. Any executable you make have dependencies on some Windows components, and by default, these files have no debugging information associated with them. That's why you get "cannot find or open pdb file."
But since you are not going to debug those files, you don't need that information, so you can ignore it. The important thing is that it loads the pdb (debugging info) from your own executable, which it is in this case.

There are an infinity number of different combinations of loops. You cannot learn them all.
You should make a flowchart if you cannot mentally picture how to make a loop required for the task you are doing.