c++ - 2 dimensional array (char**) with posix_memalign and its deletion -


i have couple of questions (my homework^^). 1. if lay char** array "new", char** buffer = new char[2][512]. how should delete it? delete[] buffer correct? 2. if lay malloc? i.e char** buffer;

buffer = (char **) malloc(2 * sizeof (char *)); (int = 0; < 2; i++)         buffer[i] = (char *) malloc(buffer_len * sizeof (char)); 

should free free(buffer)? 3. must same thing posix_memalign, have no idea how can that. please help.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -