I have a simple menu, something like the following:
while(cmd != quit){
cin >> cmd;
swith(cmd){
case 'a':
blah();
break;
case 'b':
boo();
break;
}
}
what would i have to do inorder to make sure it handles not only input from the console, but also file redirection in unix/linux?
thanks!
Do you mean redirection as in:
In that case you don’t have to do anything special. The shell already directs your input into stdin of your program.