If you write
#include <iostream>
there won't be any compilation errors. If you have some errors, they cannot be related with this identifier. Check up what's in the
#include
line. I have only on explanation: your observation is incorrect. Rebuild the project cleanly.
Solution 1 is wrong, but the advice is correct: you don't need these extra brackets.
Also, replace
else if (finalScore < 60)
with
else
. Do I even have to explain why? Also, avoid
immediate constants like 60, instead, declare explicit constant, otherwise your code would be bad for maintenance.
—SA