Quantcast
Channel: What exactly is the ->* operator? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

What exactly is the ->* operator?

$
0
0

I've never used it before and just stumbled upon it in an article... I thought it would be the equivalent to *x->y but apparently it isn't.

Here's what I tried, and gave me an error:

struct cake { int * yogurt;} * pie;int main(void) { pie = new cake; pie->yogurt = new int; return pie->*yogurt = 4;}

Viewing all articles
Browse latest Browse all 5

Trending Articles