Quote:
Originally Posted by mirv
Also unless you mean to use things like operator overloading (+, -, *, /, etc) with a class, you should probably try and avoid the name "operator" for a function, as it may also cause a few complications.
|
Well my problem was whole about operator overloading.
Code:
int operator() () {return 8;}
operator() is operator. It is very nice operator, you can work with class as if it was function. Another cool operator is
opeartor bool(), which allows you to include your class in if statements...