I am trying to get my text file to be read and then have it output. I keep getting a blank black cmd box. Any hints? I've used a similar format of this for inputting information from a text to make calculations and then output those calculations, but for some reason I can't get the actual text from a .txt file to appear
Ok, so.. I open the file, why am I still getting just a black cmd without any info
int main()
{
ifstream notepad("student-scores.txt");
string name;
int score;
notepad.open("student-scores.txt");
while (notepad >> name >> score)
{
cout << name << score;
}