+ 1

Why is it that when i try to free my dynamic array it gives me an invalid address specified error?

I am trying to free(array) on a double* array = malloc...; , but i keep on getting this error. can anyone help/explain?

29th Oct 2021, 1:38 AM
Kareem Idris
4 Respuestas
+ 4
Can you share your code? Save your code in code playground and share it's link here
29th Oct 2021, 2:07 AM
Rishi - avatar
+ 2
Either you already freed that memory or you're trying to free and address that was not given to you by a malloc(calloc, realloc)
29th Oct 2021, 5:39 AM
Angelo - avatar
+ 1
It was because i wrote my realloc wrong
30th Oct 2021, 2:34 AM
Kareem Idris
- 3
Kimbo Slicer ūü§¶ūü§¶ At least try to read your own code carefully before asking questions. Unbelievable!
30th Oct 2021, 9:35 PM
ūüĆÄ Shail Murtaza ōīōĻŘĆŔĄ ŔÖōĪō™ō∂ŘĆŔį
ūüĆÄ Shail Murtaza ōīōĻŘĆŔĄ ŔÖōĪō™ō∂ŘĆŔį - avatar