Friday 9 August 2013

Abbreviate a statement in C++ to a keyword

Abbreviate a statement in C++ to a keyword

Is there a way to abbreviate a statement in C++ for instance if i had
something like this
ui.myplot->graph(0)
and I would like to abbreviate it as mygraph so that instead of going like
this
int a = ui.myplot->graph(0)->val;
I could do this
int a = mygraph->val;
I know typedef wont work here. Any suggestions ?

No comments:

Post a Comment