I've never used EOF before and I'm wondering how I could create a code that continues running until I press Ctrl+D to activate EOF. This is the general idea I have:
int main(){
    int num;
    while (!EOF) { //while the EOF is not activate
        cin >> num; //use cin to get an int from the user
        //repeatedly give feedback depending on what int the user puts in
        //activate EOF and end the while loop when the user presses "Ctrl + D"
    }
}
So how would I set it up to end when the user presses Ctrl+D? Thanks!
 
     
     
    