Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ typeid()

Name: Anonymous 2006-01-11 12:59

Does anyone know how typeid() is implemented in C++???
I mean, how do I make a function like typeid() where I can pass the TYPE as a paramter.

Example:
int main()
{
    typeid(int);//<-- works of course
    f(int);//<-- how to do something like this
           //        without using macros or templates
}

Name: Anonymous 2006-01-14 8:05

>>29
java uses this silly bytecode to store all sorts of ungodly crap. yeah java is pretty damn slow but it has all the bells and whistles you might never use. The only thing C++ and java have in common are the syntax.

You should reconsider redesigning your program so you don't even need to check for the type (ie. you know where everything is and what everything is). Make it more deterministic like it should be written in the first place.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List