hi, everyone i want to ask about EOF in C++
when i learn C to use EOF in my code is like this :
while (scanf("%d",&a) != EOF){
statement
...
}
but, when i use in C++ {
while ((cin >> a) != EOF){
statement
...
}
it's having an error. So my question is how can i use EOF in C++ if the code's like that?
I'm sorry it's a newbie question, because i can't find the answer >.<