How can I signal XTerm terminal to end of input. In my case, I run a C++ program in XTerm console and I want to signal the program the end of input by pressing some combination of keyboard buttons.(I tried Ctrl+D Ctrl+Z ).My program goes like this :
map<int,string>info;
string name;
int age;
cin>>name;
while( **?????????** ){ //Input till EOF , missing logic
cin>>age;
info.insert( pair<int,string>(age,name) );
cin>>name;
}
The program proceeds upon receiving the end of input signal from terminal.