hi, i need a solution on how to read a struct which includes serveral types of vars with a pointer of type char. example:
struct test { char a; int b; int c; char d; }; struct test s_test; char *p_test; p_test = &s_test.a; ...
You need a pointer that points to the proper type, in this case, a "struct test *". In your example code, just declare the pointer correctly.
struct test { char a; int b; int c; char d; }; struct test s_test; struct test *p_test;