C - Setting a struct to null (incompatible types in assignment)

后端 未结 4 1839
旧时难觅i
旧时难觅i 2021-02-10 02:46

I have the following struct:

struct elem {
  int number;
  char character;
};

struct item {
  struct elem element;
};

and the following functi

4条回答
  •  日久生厌
    2021-02-10 03:13

    NULL is a pointer value, wrapper->element is not a pointer, therefore you cannot assign it NULL

提交回复
热议问题