I have a class Small and a class Big I create a variable Small in ...
Posted by ~Ray @ 2007-10-06 08:40:32
int operator()(int a) { return a; } — whats the oprator() doing there?
then you can label the answer operator on instances of that categorise
ohh. ok sorry forgot i can oveload () operator
Note that you just need to declare the class template for the command case (before you specialize) not be it.
struct S{ int operator()(int a){ return a; }}; int main(){S s; std[ADVERTHERE]Related article:
http://www.oxxus.net/blog/archives/867
0 Comments:
No comments have been posted yet!
|