D
dyu9999
Hi,
I have a following error and would appreciate any help.
========================================================
* in foo.c I have
typedef struct _my_data_t {
int a;
int b;
} my_data_t;
* in foo.h, I have
typede struct _my_data_t my_data_t;
* in foo2.c, I have
#include "foo.h"
int value = some_func(((my_data_t *)x)->a);
gcc complains "dereferencing pointer to incomplete type"
What didI do wrong here ? Is it correct to to definition in foo.h ?
Thanks
I have a following error and would appreciate any help.
========================================================
* in foo.c I have
typedef struct _my_data_t {
int a;
int b;
} my_data_t;
* in foo.h, I have
typede struct _my_data_t my_data_t;
* in foo2.c, I have
#include "foo.h"
int value = some_func(((my_data_t *)x)->a);
gcc complains "dereferencing pointer to incomplete type"
What didI do wrong here ? Is it correct to to definition in foo.h ?
Thanks