Subj : Typecasting question To : borland.public.cpp.borlandcpp From : Rick Date : Tue Dec 14 2004 12:33 am Hi, Let's say I have something like this: class X{}; class Y: public X { public: int aValue; }; X *objects[10]; I have a few questions about this. I'm not very skilled in C++ so is this code correct: objects[0] = new Y(); From what I know, the compiler takes this code and I can make use of its overloaded functions. But the objects array is pointing to X classes. And when I want to call a property from the Y class, I don't know how to do this. I tried typecasting but it didn't work: someValue = (X)objects[0]->aValue; aValue isn't a member of the X class, how to tell that objects[0] is actually an instance of class Y? Greetings, Rick .