我從一個文本文件中讀取各行,並試圖打印出來就在命令提示符下各行,但文字只是閃爍真的很快和消失。C++打印文本在for循環中
我在readable.txt
cout << "These are the names of your accounts: " << endl;
for (int b = 1; b <= i; b++)
{
fstream file("readable.txt");
GotoLine(file, b);
string line;
file >> line;
cout << line << endl;
}
cin.ignore();
break;
任何幫助,將不勝感激設定的行數。