Connecting Tech Pros Worldwide Forums | Help | Site Map

Class templates

Gunter Schelfhout
Guest
 
Posts: n/a
#1: Jul 3 '08
template <class Tclass X {
public:
...
private:
vector<T*vP_;
....
};

GCC is complaining with 'error: ISO C++ forbids declaration of ?vector? with
no type'.

Is this wrong?
Or is it right and is it the context which may be wrong?


Gunter Schelfhout
Guest
 
Posts: n/a
#2: Jul 3 '08

re: Class templates


Gunter Schelfhout wrote:
Quote:
template <class Tclass X {
public:
...
private:
vector<T*vP_;
....
};
Aaaaargh.
std::vector<T*vP_;
^^^^

Closed Thread