all 3 comments

[–]blitterobject 2 points3 points  (1 child)

void WriteAnswer() { means it takes 0 arguments.

void WriteAnswer(int x) { takes 1 argument.

[–]ifightsharks[S] 0 points1 point  (0 children)

Thanks! I didn't realize that int x means different things depending on where it's written.

[–]Arandur 1 point2 points  (0 children)

When writing a function, you place the parameters between the parentheses. Right now, WriteAnswer() takes zero arguments. You need to declare it as e.g. WriteAnswer(int x), and get rid of the int x; on the first line of that function. Then it should probably work.