Thanks to Tyler, Peter, Furgan for your quick help.  Wow!

I have another.  I am trying to simply print a statement containing the name of 
the generating class (or type of the object) when the constructor is called.  
Like...

        myClass::myClass() {
                cout << "Debug:  call constructor for ";
                cout << typeid(this).name << "\n"; 
        };
        
The compiler complains with
error C3867: 'type_info::name': function call missing argument list; use 
'&type_info::name' to create a pointer to member

So I change the above to include & in front of typeid and get:
error C2276: '&' : illegal operation on bound member function expression

So, what's with that?


Reply via email to