Answer the question
In order to leave comments, you need to log in
How to display text from a C++ file on button click?
Hello!
I started learning how to work with files in C++ and ran into a problem with text output.
My code:
ifstream fin;
fin.open("myFile.txt");
string arr_char;
for (int i = 0; fin.eof() == false ; i++)
{
fin >> arr_char;
cout << arr_char << endl;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question