![]() |
| ||
| Debug Assertion Failed! I have this error when debugging called Debug Assertion Failed , does anyone know what that means? Im using Visual C++ 2008. void merge (string alpha, string beta) |
| ||
| Re: Debug Assertion Failed! The error will also tell you what assertion failed and where it failed. Basically it means you used a library class or function the wrong way, such as passing a null pointer to strcpy. |
| ||
| Re: Debug Assertion Failed! ok so since it happened after I put in this function its somewhere in here, do you see any problems with this code that would make that error? void merge (string alpha, string beta) |
| ||
| Re: Debug Assertion Failed! this line is wrong: merge(words.begin(), words.end(), words2.begin(), words2.end(), results.begin()); You call the function with 5 parameters, but the function only expects 2 ( void merge (string alpha, string beta) What is your program supposed to do? |
| ||
| Re: Debug Assertion Failed! >do you see any problems with this code that would make that error? Yes, and while I'm still miffed that you failed to post the complete text of your error even after I not so subtly informed you that more information is present, I'll tell you what the problem is: merge(You need to use some kind of insert iterator to add new items to an empty vector, or you can resize the vector before calling merge: merge (>You call the function with 5 parameters, but the function only expects 2 Can you say "overloading"? |
| ||
| Re: Debug Assertion Failed! Quote:
Silly me, disregard my previous post as it is not worth the space somewhere on a webserver... |
| ||
| Re: Debug Assertion Failed! The error looks like this: Debug Assertion Failed! line 2508 expression: sequence not ordered And here is my entire code: #include <iostream> |
| ||
| Re: Debug Assertion Failed! Sort your vectors before merging. |
| All times are GMT -4. The time now is 9:12 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC