We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a structure defined as typedef struct example{ int a; char b; example c; }STRUCT_EG; and I declare a pointer to this structure as STRUCT_EG *Struct_ptr To check whether the pointer is pointing to NULL I use the following "if" statement if (Struct_ptr == (STRUCT_EG*)0) I was wondering whether this method is acceptable as I could not get it to work correctly (ie the "if" condition doesnt go through eventhough the pointer is null). Are there any other ways which I can use? Please advise. Thank you.
if (Struct_ptr == (STRUCT_EG*)0)
if (Struct_ptr == NULL)
if (Struct_ptr == 0)