i read many threads like How to make struct members private? Hiding members in a C struct but i didn't help me, such that i have a header file
#ifndef TEST_H_
#define TEST_H_
typedef struct point point;
#endif /* TEST_H_ */
and c file
#include "test.h"
struct point
{
void *data;
};
and when i'm trying to create an instance of point structure in the main.c as
static point objpoint;
main()
{
}
the compiler is getting this error Description Resource Path Location Type
237 variable "objpoint" was declared with a never-completed type main.c
BTW, if i defined a pointer to the struct like
static point *ppoint;
the compiler won't generate any errors
Also, one more important information that i need to avoid any dynamic allocation for the struct object
please advise.