Add these kind of lines in your code to view the status of variables.Code:std::cout "This is a debug statement showing that variable whatever is: " << whatever << std::endl;
The same idea can be applied to checking where your program branches.
If you don't like this approach, figure out how to use a debugger.