typeinfo header file

QUOTE From where should I get this header file. This is required in one of the based program.Should I get this.UNQUOTE
Last edited on
<typeinfo> is a standard header file so it should be included in your standard library implementation.
It is correct. But since I am using C++ turbo compiler. I do not find the said header file as compiler is showing error. The programm is as under:

#include <iostream.h>
#include <typeinfo>
//using namespace std;

int main () {
int * a,b;
a=0; b=0;
if (typeid(a) != typeid(b))
{
cout << "a and b are of different types:\n";
cout << "a is: " << typeid(a).name() << '\n';
cout << "b is: " << typeid(b).name() << '\n';
}
return 0;
}
I am using C++ turbo compiler


That's the problem. It's so old that it's missing huge parts of the C++ language. You can get a new, working C++ compiler for free. Please do.
Try <typeinfo.h>.

Are you sure Turbo C++ supports RTTI?
Try specify file extension <typeinfo.h>
I also tried to add file extension <typeinfo.h>. Any way I shall try to get rid of,
if possible.

Thanks.
Topic archived. No new replies allowed.