On Nov 28, 4:51 am, Wojtek Michalik <[EMAIL PROTECTED]> wrote: > template<typename T> class Stack { > struct Link { ... > }* head; ... > class iterator { // Now define it > > Stack::Link* p;
Link* p; > /* Compile error int above line > compiled with: g++ -fpermissive -c TStack2Test.cpp > error: type 'Stack<T>' is not derived from type 'Stack<T>::iterator' > error: expected ';' before '*' token > > */ > > public: ... > // operator++ returns boolean indicating end: > bool operator++() { Please don't do that. Post any questions about the proper semantics of operator++ here, or in comp.lang.c++, or in comp.lang.c++.moderated. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus