By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

error in template

P: n/a
Hi,
Why I get a error ?Please help me.
template <typename InterceptType>
class InterceptSet
{
public:

typedef vector< InterceptType >::iterator iterator;
typedef vector< InterceptType >::const_iterator const_iterator;
......

};

error C2144: syntax error : 'std::iterator' should be preceded by ';'

Feb 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 2007-02-19 18:09, antani wrote:
Hi,
Why I get a error ?Please help me.
template <typename InterceptType>
class InterceptSet
{
public:

typedef vector< InterceptType >::iterator iterator;
typedef vector< InterceptType >::const_iterator const_iterator;
.....

};

error C2144: syntax error : 'std::iterator' should be preceded by ';'
I think you should squeez in a typename after the typedef but before the
vector, like typedef typename vector<...

--
Erik Wikström
Feb 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.