This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

error: redefinition of `class Array<T>'


Hi

I am building an Array group of classes, I have base Array class with
derived vector, matrix and cube. Each derived class works fine separately,
but if I combine them in a program I get:

error: redefinition of `class Array<T>'

this happend beacuse when I :

#include <vector.h>
#include <matrix.h>
#include <cube.h>


array.h get included too, so the compiler triggers the error. The problem is that I have to include
array.h into the matrix, vector and cube header files in order to use the array base class.
Any help would be apprecciated. Many thanks


Paulo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]