I need some help with this.
The following code should be reading the file, and outputting it, but it stops when it hits spaces. I need to know how I can get it to read the entire line.
ifstream fin;
fin.open(bunFile.c_str());
string line;
while(!fin.eof()){
fin >> line;
cout << line << endl;
}
fin.close();
the bunFile contains an ASCII bunny, but, as I said, it stops when it encounters a space, and doesn't finish reading the line. How can I make this work?
Thanks,
caden911

New Topic/Question
Reply




MultiQuote





|