# point operator?

## Recommended Posts

Hey Everyone, I have a small problem with the point operator. In another class I have initialized some variables. Now I want them to use. So the normal procedure is: class1.variable_x But what if I want to use the negative of variable_x or to increment it class1.-variable_x ??? class1.varible_x++ ??? These lines above are not working. How can I do it? Thanks for your help Cheers

##### Share on other sites
-x.y

If you have variable y, located in x, then the name of y is "x.y". Same for all other dereferences. The name of z could be "A::B->c->d.x.z".

##### Share on other sites
You can always wrap stuff in parens to disambiguate the meaning for your compiler and for yourself.

--(foo.bar);-(A::B->c->d.x.y.z);(*(foo->Bar::baz))++;

##### Share on other sites
Thanks guys

now everything is clear!!!

:)

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
627701
• Total Posts
2978698

• 21
• 14
• 12
• 10
• 12