Im trying to update a field of a struct that's a pointer like so:
typedef struct Data *STRUCT_POINTER;
typedef struct Data
{
int element;
STRUCT_POINTER next;
} STRUCT_NODE;
void manipulate(STRUCT_POINTER *data ) {
data->element = 1;
}
But I get a warning saying
expression must have pointer-to-struct-or-union type but it has type "STRUCT_POINTER *"
My question is, how how do I update the field element from the Data struct while using it as a pointer? Or is it even possible?