mercredi 25 mars 2015

how to let the program know that the file ends when I use while(cin>> )

when i use while(cin>> ){} in my program how to end the input? I tried Ctrl+D and also Ctrl+Z, but none of them work. outputs of both cin>>^Z and cin>>^D are true. how to let the program know that the file ends? how to pass Null Character such that the output of cin>> be false and while end?


Aucun commentaire:

Enregistrer un commentaire