"Debug Assertion Failed" HELP?
4 posters
Page 1 of 1
Re: "Debug Assertion Failed" HELP?
Need to see the code - I'm pretty sure it's caused when invalid memory is accessed
Alex- Posts : 67
Join date : 2012-02-23
Location : Come at me bro
Re: "Debug Assertion Failed" HELP?
Here's the program in full - there's a chunk commented out where I was trying and failing to sort zero and negative zero, but otherwise everything in there appears functional.... even if it is horribly inefficient...
Last edited by VicVic on Wed Feb 29, 2012 4:19 am; edited 1 time in total
VicVic- Posts : 17
Join date : 2012-02-28
Re: "Debug Assertion Failed" HELP?
i beleve u are using two different functions for timing!
i would suggest replacing ur timers with
that gives u number of clock ticks
u can then use function
say
i would suggest replacing ur timers with
- Code:
float timer;
clock_t a = clock();
*code*
a = clock() - a;
that gives u number of clock ticks
u can then use function
say
- Code:
timer = a/CLOCKS_PER_SEC;
Last edited by John on Wed Feb 29, 2012 7:00 am; edited 1 time in total
Re: "Debug Assertion Failed" HELP?
Turns out it was due to the fact that I'd try to free up the array at the end (at the advice of a friend), despite not using malloc to create a dynamic array.
Problem solved =)
Problem solved =)
VicVic- Posts : 17
Join date : 2012-02-28
Re: "Debug Assertion Failed" HELP?
VicVic wrote:Turns out it was due to the fact that I'd try to free up the array at the end (at the advice of a friend), despite not using malloc to create a dynamic array.
Problem solved =)
If your using C++ you shouldn't be using malloc anyway, use new and delete[]. Read here for more info on dynamic memory.
daveclarke- Posts : 8
Join date : 2012-02-24
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum