Using Inheritance one classes

Using Inheritance one classes question.

Class hello
int hi;

what would the inheritance be for this class?does the inheritence copy the values in the welcome array aswell and if that happens, changing any values later on in the code from welcome[0].hi,welcome[1].hi,welcome[2].hi would they change in the other class as well?javascript:PostPreview()
There's no inheritance here.
I'd suggest looking at the appropriate chapter again.
How do I Make an Inheritance from this class, dont u read?
An example of "Inheritance from this class" (assuming that you correct your class declaration) would be:
class CDerivedHello : public hello
  char *sGreetings;
Your "welcome" identifier is for an array of "hello" objects, and declaring another class (using inheritance or not) won't change this "welcome" in any way (it still will be as warm as ever). Having another defined class gives you the possibility to declare and use another kind of objects (with some degree of backward compatibility). But objects are independent. Changing something in the "hello" class objects won't affect neither the (other) objects of the same class, nor the objects of some derived class.
P.S.: You're here on a C/C++ forum so please no javascript here!
This is java? didn't know, i am using a different one from c++ but its linked into c++ very closely. so your saying if i wanted Derivedhello[0].hi and hello[0]. hi to be same number, i have to set each of individually?
Topic archived. No new replies allowed.