I want to know why while compiling my code in ubuntu this message appears
$*** glibc detected *** ./a.out: malloc(): memory corruption: 0x00000000024dd190 ***
but the same code works without any error in code::blocks and gives me the right results ?? I need your help to fix this error .
I've tried to update the compiler but that doesn't work?!
Update:
the error appears when executing this statement:
$first_array = (unsigned long*)malloc(sizeof(unsigned long*));
I don't see that there's any error in it, Yes??