return 2D array from C function

前端 未结 0 877
忘掉有多难
忘掉有多难 2020-12-19 04:42

Inspired by this question. I created this function:

char** char2Da (int r, int c) {

    char (*p)[c] = malloc(sizeof(char[r][c]));
    // come code filling 2         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题