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

vector iterator within a template

P: n/a
I need some help with this please. Here's the important part:

#include <vector>
#include <string>
................
template <class T>
bool ResourceManager<T>::isLoaded(const std::string Filename)
{
std::vector<T>::iterator it; //error: expected `;' before "it"
return false;
}

This won't compile. I'm using the newest MinGW, not that it matters. As
the comment says, the iterator declaration causes an error. I'm pretty
sure i've encountered this problem before but i can't remember how i
fixed it. If i replace the "T" template parameter in the iterator
declaration with a regular type, like an int, it compiles fine.

Dec 30 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ahh, nevermind, found a solution:
http://groups.google.com/group/alt.c...a60d0f26e0dbbb

Dec 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.