M
mark
The problem with this code snippet is that only outputs the first word
in the file "test". The file has atleast one line with 4 words in it,
only one word is output. I have tried increasing the array size as
well, still only the first word is output ?
what is the error ?
file "test" contains "Line one here"
output ---> "line"
char str[20];
ifstream b_file("test");
b_file>>str;
cout<<str;
b_file.close();
in the file "test". The file has atleast one line with 4 words in it,
only one word is output. I have tried increasing the array size as
well, still only the first word is output ?
what is the error ?
file "test" contains "Line one here"
output ---> "line"
char str[20];
ifstream b_file("test");
b_file>>str;
cout<<str;
b_file.close();