Run-Time Check Failure #2 - Stack around the variable 'phone' was corrupted.

Im a beginner in C++ and i have no idea why i will have run-time check failure. Can anybody explain why this will happen. I've check thru the coding and no errors for now (not that i can see of). It will only happen sometimes, when i try all valid and invalid input. Pls help, I need to submit this assignment tomorrow.
Last edited on
It's in line 132 of your main source file. You're incrementing the variable i one too many times.
MikeyBoy, what exactly is line 132? And what do u mean by incrementing the variable i? Sorry.. but im really bad at this. Can i send u the file?
It's going to be hard for anyone here to diagnose the problem without seeing any of your code. :)

Can you post the code you're having trouble with? Please use code tags to make it easier to read.

[code]your code here[/code]
Last edited on
Its ok. I found the problem. Thx people!
Last edited on
Well, my telepathy is notoriously unreliable. Now that you've posted the code, rather than expecting us to read it from your mind, this should be easier.

Although it would be even easier if you used code tags to make your code more readable:

http://www.cplusplus.com/articles/z13hAqkS/
Last edited on
MikeyBoy, any errors? Im worried that it might cause my assignment to fail due to this error. And my compiler seems to display
 ** Advance Search **
Please enter User ID or User Name that you desire:
Invalid Input!!
Search not found!! 


without letting me to key in anything. However, i've send the file to my friends and they can run it, but the same run-time error message is shown. And sometimes it wont show the error message, it is only shown when i run through the whole program.
Last edited on
What series of menu choices are you making when you replicate the run-time error?

Do you have a sample line of the text file that you're reading in?
Topic archived. No new replies allowed.