Car is a template class, and its constructor is defined as follows:
template <class carObject>
explicit Car( const carObject & notFound, int size = 101 );
Car( const carObject & rhs )
In my header file (h), I have:
class Storage{
public:
Storage();
Car <char*> myCars[12];
};
In my CPP file (.cpp), I'm trying to initialize myCars array using initializing list as follow:
Storage::Storage()
: myCars("notFound", 20)
{ //my other stuff}
but I keep getting the error message:
error: invalid initializer for array member Car:myCars("notFound", 20)
Any help?
Storage::Storagecome from?Storage::Storageis the class that hasCar <char*> mycars[12]declared in