R
Rom
I have a class difined as follows:
template <typename W>
class testingW {
public:
.........
private:
W testW;
}
Now I have another class
class testingW; //make the testingW class visible
template <typename T>
class testingT{
public:
vector < testingW<T> > getTestingW() const; // <------- Error Here
private:
T testT;
}
In short, I'm trying to return a vector that contains a series of
testingW<T> objects however my compiler says it is an illegal template
argument (using CodeWarrior as my compiler), what am I missing here?
If I simply try vector < testingW > getTestingW() const; then
it says it is expecting "<" , I'm assuming it wants <T> where T can be
anything but as I said it produces an error
Any help would be much appreciated
template <typename W>
class testingW {
public:
.........
private:
W testW;
}
Now I have another class
class testingW; //make the testingW class visible
template <typename T>
class testingT{
public:
vector < testingW<T> > getTestingW() const; // <------- Error Here
private:
T testT;
}
In short, I'm trying to return a vector that contains a series of
testingW<T> objects however my compiler says it is an illegal template
argument (using CodeWarrior as my compiler), what am I missing here?
If I simply try vector < testingW > getTestingW() const; then
it says it is expecting "<" , I'm assuming it wants <T> where T can be
anything but as I said it produces an error
Any help would be much appreciated