Hi it's my first time posting on the forums. But anyways I'm having a problem with one of my functions inside my class. It's return the wrong value and I have no clue why. For example if I set the variable to 0 and I use the function to inc it by one it goes to either 1 or 2. I've had both results. Now if I loop printing it to the screen in my main it increases by 2 instead of 1.
1 2 3 4 5 6 7 8
That is just an example of what my code is as I'm not home currently to type it code for code. I'm assuming that it's something in my abc.cpp example.But in the main all it does is a simple cout to display the return so I.doubt it's that. Thankyou in advance for the help! Oh and also I'm on my phone so sorry about not tabbing my code I had to use spaces :P