Edit your post to include code tags. It makes the whole thing so much more readable.
Looking at what's there, I see lots of brackets and I'm not sure what belongs to what.
Specific Issues:
Should be == rather than =. One is a true/false check, the other is assignment.
Is answers defined somewhere? I'm not seeing the array (and it'd be cleaner/safer as a vector, or even possibly a map in this case).
Also I'm not sure (due to the bracket issue) but your if/else chain might be causing problems. Have you considered using a switch statement instead?
It'd look something like this:
1 2 3 4 5 6 7 8 9
|
switch(somechar) {
case 'a': dosomething;
break;
case 'b': dosomething;
break;
//...
default: dosomethingelse;
break;
}
|
Finally, do you know where your files are going to show up? You might just be checking the wrong place -- the project folder is the likeliest bet!
General tips that I've read and thought were smart:
If you're using variables like error1, error2 etc, use a vector instead. It's neater, and it lets you do exactly the same thing.
score = score + 1 can be rewritten to score +=1, or just ++score. In other words, don't write more than you have to -- typing errors can cause lots of stupid problems.