Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Class templates

Question posted by: Gunter Schelfhout (Guest) on July 3rd, 2008 10:15 AM
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?

Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Gunter Schelfhout's Avatar
Gunter Schelfhout
Guest
n/a Posts
July 3rd, 2008
10:25 AM
#2

Re: Class templates
Gunter Schelfhout wrote:
Quote:
Originally Posted by
template <class Tclass X {
public:
...
private:
vector<T*vP_;
....
};


Aaaaargh.
std::vector<T*vP_;
^^^^


 
Not the answer you were looking for? Post your question . . .
184,043 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors