.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   [C++] Class names (http://forums.bots-united.com/showthread.php?t=4389)

sfx1999 25-08-2005 04:30

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.

Pierre-Marie Baty 26-08-2005 02:05

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.

DrEvil 29-08-2005 19:30

Re: [C++] Class names
 
Have you looked into the typeid operator? Does what I think you're asking about.

cld 06-10-2005 01:42

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.