(C++) No errors, but program wont run the way it should!
Well the primary problem seems to be your size value. I don't really see you updating it and you really shouldn't have it anyway. The size of the array can be obtained easily. Either update the size, or stop relying on that value (which would be the better option since you can get the length of any arbitrary array myArray with myArray.size() ).
Debugging tips: Print out every variable that you think may be causing the problem. You figured that at one point it didn't work, which is good, but printing out can help you determine the culprit. Perhaps, use standard error to print them out since you aren't using it in this case to make it easier to clean up.
Hey, thanks for the reply. I ended up fixing my problem but I don't want to get into too much detail since I had to play with my header file as well.
You guys rock.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now