struct dereference operator
| DeepBlack (34) |
|
given
1 2 3 4 5
|
typedef struct ex1
{
int i;
void* p;
}struct_ex1;
|
is (struct_ex1)->i equivalent to struct_ex1.i ?
|
|
Last edited on
|
| pogrady (411) |
|
|
no. struct_ex1 is an alias of ex1. The first way would not compile.
|
|
|
| maeriden (244) |
|
is equivalent to
Given that struct_ex1 is a pointer
|
|
Last edited on
|
Topic archived. No new replies allowed.