I need to loop a cin until the use inputs no number. what does the if statement have to be to do this? i tried if input==NULL but with integers, NULL = 0. i don't want to have that because 0 is such a common number. is this possible?
thus, i've written:
bool check;
int input;
while(check)
{
cin >> input;
if(input==????)
check=false
else
list.insertNode(input);
}
2006-10-18
15:46:52
·
3 answers
·
asked by
ifoam
3
in
Computers & Internet
➔ Programming & Design
what im doing is allowing a user to input as many integers as they want. they choose when to stop. then i will add all the integers to a linkedlist
2006-10-18
16:03:10 ·
update #1