in the following code im copying how i keep seeing it online and in a book but all im getting is the dos windowing popping up and printing and infinte supply of nothing scrolling down forever
im trying to get it to stop at the end of the file but its just going on forever any reason for this??? there must be one but i cant figure it out. this looks about the same way it was set up in C++.net and now i was trying to do it in regulare C++ and i cant figure out why its not working this time. help? and thanks!
Code:char str[50]; ifstream in("yes.txt",ios::app); while (!in.eof()) { in.getline(str,50); cout << str << endl; } in.close();