Thomas Maeder wrote:
> [EMAIL PROTECTED] writes:
> 
>>     Thanks. I tried this and I seem to get a number infront of the
>> class name that is printed. Is this expected?
> 
> The result of typeid(*ptr).name() is implementation defined. The only
> thing you can rely on is that it's a null-terminated string.

At least recent g++ support automatic demangling of these
strings into human-readable format. 

For details, see thread "Re: RTTI and typeid().name()"
posted in in gnu.gcc.help on 12 Jan. 2005 by Guy Harrison.

Eventually the same code works on Intels compilers, too.
(To be checked...)

RU,
Andreas
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to