Hi I want to how can we take input from stdin
again after I invoke:
freopen("Smefile.txt","r",stdin);
Precisely I want my first in first of my program should take input from a designated file the next part would take from the stdin.
Like:
int a,b;
freopen("Smefile.txt","r",stdin);
scanf("%d",&a);
{
//some block here such that the next cin/scanf takes b from standard input
}
cin>> b;
cout <<a<<" "<<b;
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…