I've found in this question a strange syntax:
struct foo {
int bar;
int baz;
};
typedef int foo::*foo_member;
foo_member m = &foo::bar;
I still do not understand the type foo_member
, what does type int foo::*
mean?
Even more confused, what is &foo::bar
in the initialization
foo_member m = &foo::bar;
and
foo AS1* f = /* ... */;
f->*m = 4;
I suppose that means f->bar = 4
(or not?), what does syntax f->*_variable_
mean?
Many thanks for any response.