![]() |
Re: [C++] Class names
Oh I didn't notice that before. Doh!
I think the only flaw with the methods now is if you forget to override/modify the constructor. That could be nasty. |
Re: [C++] Class names
Aspirin, why don't you do like with your real-time profiler ? Use a sort of string variable that is overwritten each time a class is instanced.
IMO that's the simplest way to do things. |
Re: [C++] Class names
Have you looked into the typeid operator? Does what I think you're asking about.
|
Re: [C++] Class names
class CBot
{ public: void print() { printf("bot\n");} }; int main ( int argc, char** argv ) { CBot bot1; printf("Name of class bot1 is %s\n",typeid(bot1).name() ); } is it? |
All times are GMT +2. The time now is 07:04. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.