Are you trying to solve the OPs problem or are you trying to help the OP solve the problem?
If you're going to solve the problem at least explain what you did to find the problem and what you did...
Type: Posts; User: Norm
Are you trying to solve the OPs problem or are you trying to help the OP solve the problem?
If you're going to solve the problem at least explain what you did to find the problem and what you did...
Seems the OP missed a couple of lines when he posted his code. Add }\n void mainLoop() {
after the call to mainLoop.
First question: Why use a while() rather than a for() loop?
What does this mean?
Try debugging your code by adding print outs of ALL the variables values as the loop executes.