Problem states that input ends with a normal end of file marker. and i use something like
Code: Select all
char str[3001]
while(!cin.eof())
{
cin.getline(str,3000);
.......
}
Moderator: Board moderators
Code: Select all
char str[3001]
while(!cin.eof())
{
cin.getline(str,3000);
.......
}
Code: Select all
while(gets(str)!=NULL)
{
....
}
Code: Select all
string S;
while (getline(cin,S)) {
...
}
Code: Select all
my_program < input.txt > output.txt