[Solved] Freeing char[] in C gives error and how do C compiler handle that char[]
[ad_1] You only free what you have allocated using malloc (directly or indirectly) or related function (like realloc). Attempting to pass a pointer not returned by malloc will lead to undefined behavior. That you get a compiler error for delete in C++ is first and foremost because C and C++ are different languages with different … Read more