Connecting Tech Pros Worldwide Help | Site Map

Class templates

  #1  
Old July 3rd, 2008, 11:15 AM
Gunter Schelfhout
Guest
 
Posts: n/a
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?

  #2  
Old July 3rd, 2008, 11:25 AM
Gunter Schelfhout
Guest
 
Posts: n/a

re: Class templates


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

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class templates and singleton container Bit Byter answers 4 November 4th, 2008 10:45 AM
class templates with pointers to each other in seperate header files Ben answers 12 May 29th, 2006 06:35 PM
Where do Class Templates come from? Dave answers 2 April 21st, 2006 12:05 PM
specialization of member functions of class templates SainTiss answers 4 July 22nd, 2005 05:35 AM
Class Templates Andre answers 3 July 19th, 2005 06:25 PM