In Inheritance: Can I override base class data members?
<p>Lets say I have two classes like the following:</p>

<pre><code>Class A
{
public:
..
private:
  int length;
}

Class B: public Class A
{
public:
..
private:
 float length;
}
</code></pre>

<p>What I would like to know is:
1) Is OVERRIDING OF BASE CLASS DATA MEMBERS allowed?
2) If yes, is it a good practice?
3) If no, what is the best way to extend the type of the data members of a class?</p>

<p>There is a class that satisfies my needs and I want to reuse it. However for my program needs, its data members should be of another type.</p>

<p>I have some books, but all of them refer only to overriding of base class member methods.
Thanks everybody in advance.</p>
