HighCommander4
April 8th, 2007, 07:04 PM
I'm having a weird problem with templates. Here's the most concise code that reproduces the error:
#include <vector>
template <typename T>
class Foo
{
};
template <typename X>
class Bar
{
public:
void method()
{
std::vector<Foo<X>* >::iterator iter;
}
};
int main() {}
Dev-Cpp complains that:
In member function `void Bar<X>::method()':
Line 14: expected `;' before "iter"
#include <vector>
template <typename T>
class Foo
{
};
template <typename X>
class Bar
{
public:
void method()
{
std::vector<Foo<X>* >::iterator iter;
}
};
int main() {}
Dev-Cpp complains that:
In member function `void Bar<X>::method()':
Line 14: expected `;' before "iter"