I'm not sure how to put this into words... so how would you go about doing this:
Thanks!Code:struct TEST; { operator+ ( int ) { /* ... */ }; /* More members here*/ }; int main() { TEST* test = new TEST; test->+ 12; // NEED HELP HERE!! }
I'm not sure how to put this into words... so how would you go about doing this:
Thanks!Code:struct TEST; { operator+ ( int ) { /* ... */ }; /* More members here*/ }; int main() { TEST* test = new TEST; test->+ 12; // NEED HELP HERE!! }
You mean this:
Code:*test + 12;
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
Haha, I should've known that... I guess I was going brain-dead there for a second. Anyways, thanks a bunch!
Also, function call syntax is possible
Code:test->operator+( 12 );
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.