What is struct s supposed to be? What is p_s and p_t? they aren't even declared. What is a u_char? Where is it defined? You aren't really supposed to dereference a void*. You have to cast it into something meaningful first. Since c++ offers unions, templates and polymorphism, I rarely find a need for the use of the void* concept. At the very least you need an instance of the struct. Perhaps you meant to do this first.
1 2
s* p_s = new s();
t* p_t = new t();
Then you need to allocate memory for whatever data is supposed to be. (don't forget the semicolon after data). I have no idea what you are trying to do.
Since c++ offers unions, templates and polymorphism, I rarely find a need for the use of the void* concept. At the very least you need an instance of the struct.
Very true. But when I neglect my C for too long I tend to forget the precedence rules - especially [] and *. And when the time comes to maintain some legacy code I'm pulling my hair out at 2AM.