Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   checking object properties (http://www.go4expert.com/forums/checking-object-properties-t25955/)

rahulmaximus 1Jun2011 02:18

checking object properties
 
Hi
I wanted to know if there is a way to check whether a particular object has a particular characteristics......

suppose

class A
{
int x;
}

class B
{
int y;
}

I wanted to know if there is a way tht we can check if like B has x(integer) in it or whether A has y(integer) in it..

xpi0t0s 1Jun2011 14:24

Re: checking object properties
 
Not unless your compiler implements some kind of runtime type information (RTTI).


All times are GMT +5.5. The time now is 13:48.