Fix debug assertion failed on Visual Studio 2010 C++

Asked By 60 points N/A Posted on -
qa-featured

Hi,

I am using Visual Studio 2010 C++ but during the programming, I got the following error message “Debug Assertion Failed”. Did I something wrong? I really need your help and want to remove this error. Provide possible solution.

Thanks for any assistance.

Debug assertion failed

Program:…

File: c:program filesmicrosoft visual studio 8vcincludevector line: 756

Expression: vector subscript out of range

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

(Press retry to debug application)

SHARE
Best Answer by Randolph Brownlow
Best Answer
Best Answer
Answered By 0 points N/A #189887

Fix debug assertion failed on Visual Studio 2010 C++

qa-featured

Hello Alisha

It would have been easier, if you had attached the text that you are trying to compile. That way, maybe I could have helped you more with fixing that error.

What I can tell you, is try using a debugger. That will probably solve the errors or at least point them, so you can fix them.

Verify every line of the text, and be sure that you did not add a range bigger than you were supposed to.

Also, be sure to have added a proper size to your vector. Being out of range, can mean that with no size added, the vector's value is 0.

I hope you will find this information useful.

Randolph

Answered By 0 points N/A #189888

Fix debug assertion failed on Visual Studio 2010 C++

qa-featured

You need to check the number of items that you have inserted at run time. Some of the item might not be matching with the vector definition. They might go out of range and that is certainly creating problem. Check each item and remove if any one of that is out of range. The problem will be solved.

Waters Magner

Login/Register to Answer

Related Questions