Need direction on what I should read up on next

So I have a game where I ask for a number of trivia questions, than they answer the multiple choice questions and they are told correct or incorrect, so now I want to have an incremental counter for the game, but I am having trouble with the updating the score in Main(), it seems like if you update within a loop it resets to one each time, so I am not sure what the best way to do this is.

I looked at functions, but I am not sure how to increment my variable each time, I looked at the tutorial but it looks like you can't do this inside of a while loop?

I was thinking each time I call the function I can update a variable outside the loop, but that didn't seem to work either.

Do I have to display the count in the function and then update that variable each time?

Not looking to have the code written, just suggestions on where I should be looking to find the answer.
Well, sometimes writing something out helps your figure it out. I ended up creating a function and made sure the variable was not in the loop. Once I added the function call to the Switch statement, we are in business.
[code]
int scorekeeping()
{
score += 1;
}
[code]
forgot backslash...
1
2
3
4
int scorekeeping()
{
score += 1;
}
Topic archived. No new replies allowed.