Salem 5,265 Posting Sage

> cout << "Type 1 to exit or 0 to continue." << endl;
> cin >> exit;
Put these two lines inside your inner while loop, so you ask after each response.

> while (!correct)
Change to
while (!correct && !exit)

exit is also the name of a function in cstdlib, so you might want to change the name of your local variable to save a bit of weirdness later on.

Salem 5,265 Posting Sage

Which compiler are you using?

Salem 5,265 Posting Sage

> if ( filename == "day_01.txt")
Use if ( strcmp( filename, "day_01.txt" ) == 0 )

Rashakil Fol commented: Hello Salem! +1