Serious gcc 4.xx template+inheritance problem

I have maybe 15 years experience running g++ 3.xx and those before.

When g++ was updated to 4.xx I had a great many problems, most of all because
the linux that came with SuSE 10 marked all errors with inclusion between
ASCII 300's, I suppose gcc expected a change of colour, but my Linux did not
know how to handle those and outputted question marks instead, which
frightened me and I decided to wait for un update of gcc 4.

After maybe two years I now need to update my g++ 3 sources, but it asks me
"What is a SATA disk? " and similars.

I feel that all Linux releases follow Windows philosophy to generate more
money: every newer version looks nicer, shows more colours and more
gradutaions, but works poorer.

At present I use:

Linux 2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 x86_64 x86_64 x86_64 GNU/Linux
with gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)

BUT ** It does not accept VectorInd::Size as being inherited from Vector, and
** enforces me to add "Vector <T*> :: " or "this ->" before every call to
something from its parent.

----------------------------------------------------------------------------------------
*********************** I feel this conficts with the basic priciples of c++ **********.
----------------------------------------------------------------------------------------

******** Can anybody tell me what I do wrong? **************

Here it is:

quote
-----
template < class T >
class Vector { // Budd p 144

/*
* +-----------------+
* | # of elements |
* +-----------------+ +------------+
* | Pointer to Data | -----> | Data [ 0 ] |
* +-----------------+ +------------+
* | Data [ 1 ] |
* +------------+
* | |
*/

protected:

uint Partition ( uint, uint );
int Quicksort ( uint low, uint hgh );

public:

uint Size;
T * Data;
....
....
....
};

template < class T >
class VectorInd : public Vector < T* > {

public:
VectorInd ( uint Size = 0 );
VectorInd ( uint Size, T * * Data );
....
....
};

template < class T >
ofstream& VectorInd < T > :: Unload ( ofstream& os ) const {
os.write ( ( const char * ) & Vector <T*> ::Size, sizeof ( Vector <T*>::Size ) );
for ( uint count = 0; count < Vector <T*>::Size; count++ ) {
Vector <T*> :: Data [ count ] -> Unload ( os );
} // for
return os;
} // ofstream& VectorInd:: Unload ( ofstream& os ) const {


uquote
------
Topic archived. No new replies allowed.