hello,
c++ doesn't store the name of the class in the binary, you'll have to store
that yourself if you want it.
Thanks,
Tyler Littlefield
http://tds-solutions.net
Twitter: sorressean
On Jan 24, 2010, at 7:35 PM, Jimmy Johnson wrote:
> 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?
>
>
------------------------------------
To unsubscribe, send a blank message to
<mailto:[email protected]>.Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/c-prog/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/