Line 4: You need
#include <string>
Lines 10-12: These lines generate truncation warnings because the right sides are by default double. Use
const double
.
Lines 16,18,146,148: Illegal escape sequence. \ space is not a valid escape sequence.
Line 31: correct is an uninitialized variable (garbage).
Line 32: If you change lines 10-12 to double, multiplier should be a double also.
Line 47: You don't check that the open of the output file succeeded.
Line 67: If the difficulty is invalid, your program will go into an infinite loop.
Line 102: You don't check that the read succeeded. What if the number of questions entered by the user is greater than the number of entries in the file?
Line 109: You're comparing an int and a string. Did you mean questions?
Line 109: Needs a ; to terminate the do/while.
Line 126: Do not put a space between ! and =.
Line 131:
if else
is not valid. Id you mean if or else?
Line 139: You're missing an opening {
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.