RAD Studio
ContentsIndex
PreviousUpNext
E2470: Need to include header <typeinfo> to use typeid

When you use the 'typeid' function, you have to include the <typeinfo> header, otherwise you will get syntax errors. 

For example, consider a test case with the following code:

int func()
{
  char * name = typeid(int).name();  // This causes an error
}
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!