(object.*func_ptr)(10);
So the value is used to determine which member function to call
- Kaijin
(object.*func_ptr)(10);
cout << boolalpha << "ca.count() = " << ca.count << endl;
ca.count() = true
~nz
quote:Original post by Polymorphic OOP
No, actually you are wrong. It would be a member function pointer if he did
&a::count
His expression, a.count without parenthesis is completely illegal C++ code and should generate a compiler error. It''s the fault of his compiler.
quote:Original post by Kaijin
Ah yes, of course. You are right.
nonpop, I tried compiling your code using gcc and it wouldn''t compile. I guess it must be a bug with the compiler.
- Kaijin