Why would this give a Use of uninitialised value of size 8

后端 未结 2 1204
情书的邮戳
情书的邮戳 2021-01-12 14:05

In my code I have a class named membrane with a function named exciteMod(), a function named decide() and a variable named delta

2条回答
  •  不思量自难忘°
    2021-01-12 14:12

    lets say you have t number of values needed to be stored. then use this:

    int *p = (int *) malloc(t*(sizeof(int)+1));
    memset(p,0,t*(sizeof(int)+1));
    

提交回复
热议问题