B
Babis Haldas
Hi There
In the follow code the line
list<A<T> >::iterator i; doesnt compile (missing ; before i)
How i should define the iterator ?
#include <iostream>
#include <list>
using namespace std;
template <typename T>
struct A {
T x;
};
template <typename T>
struct B {
list<A<T> > a;
list<A<T> >::iterator i;
};
int main()
{
B<int> b;
}
~
In the follow code the line
list<A<T> >::iterator i; doesnt compile (missing ; before i)
How i should define the iterator ?
#include <iostream>
#include <list>
using namespace std;
template <typename T>
struct A {
T x;
};
template <typename T>
struct B {
list<A<T> > a;
list<A<T> >::iterator i;
};
int main()
{
B<int> b;
}
~