N
news.coderaka
I got a compliation error when compiling this programs using g++ 3.4.2.
Who can tell me why?
Thank you.
#include<iostream>
using namespace std;
template<class T>
class list{
class iterator{
friend class list;
iterator operator++(){
return *this;
}
};
};
template<class T>
list<T>::iterator list<T>::iterator:perator++(){
return *this;
}
int main(){
return 0;
}
Who can tell me why?
Thank you.
#include<iostream>
using namespace std;
template<class T>
class list{
class iterator{
friend class list;
iterator operator++(){
return *this;
}
};
};
template<class T>
list<T>::iterator list<T>::iterator:perator++(){
return *this;
}
int main(){
return 0;
}