"Xin Wang" <wa****@engr.orst.edu> wrote in message
news:Pi*******************************@flop.ENGR.O RST.EDU...
In ansi c++, you can do something like
template <class T>
class vector<T>
{
protected:
int a;
int b;
}
Missing semi-colon.
class boundedVector<T> : public vector<T>
{
protected:
int c;
}
Missing semi-colon.
And you can use the fields of vector as if they are defined for
boundedVector, but these are no longer allowed by ansi, right?
I don't understand your question. Under what circumstances do you mean "use
the fields of vector as if they are defined for boundedVector"? A
boundedVector<T> inherits the members of vector<T>. It has always been the
case, and remains so, that a class inherits the members of its base
class(es), if any. Is that what you are asking about?
DW