Initializing a pointer to a structure

前端 未结 6 2220
半阙折子戏
半阙折子戏 2020-12-18 00:32

another linked question is Segmentation fault while using strcpy()?

I have a structure:

struct thread_data{    
    char *incall[10];
    int syscall         


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 00:47

    i think malloc(sizeof(struct thread_data)); should work, does it not?

提交回复
热议问题