int (*arr)[SZ] = (int (*)[SZ])malloc(sizeof(int) * SZ * SZ);
이것은 function pointer와 비슷하게 이해하면 되는데...
int(*)[SZ] <=> void(*)(int, char)
int(*arr)[SZ] <=> void (*func)(int, char)
즉
int [SZ] array에 대한 pointer type => int(*)[SZ]
void (int, char) function에 대한 function pointer => void(*)(int, char)
'Language > C&C++' 카테고리의 다른 글
[c/c++] file copy using 'sendfile' on linux. (0) | 2013.12.17 |
---|---|
일반 file에 대한 select/poll... (0) | 2013.11.14 |
[C/C++][Linux] Easy mistake regarding detaching when using pthread_create() without pthread_join(). (0) | 2012.10.05 |
GCC macro with variable number of arguements (0) | 2012.05.08 |
[C/C++/JAVA] 변수를 block중간에 선언하는 방법에 대한 단상. (0) | 2011.11.23 |