Hallo.
I've only just started really using the STL, and so am very unfamiliar with its workings.
I have, in the protected section of a class declaration, the following code:
list<string> itm;
list::iterator<string> ptr;
This gives me the following error:
E2102 Cannot use template 'list<_Tp,_Alloc>' without specifying specialisation parameters
Things work out fine when I try 'list::iterator<string> ptr=itm.begin()', but I want an iterator that's permanently in scope within the class. I assume that I need to let the comiler know just what sort of iterator I want (list) in my declaration so that I can link it to the list in the constructor.
Does anyone know how to do this? & maybe know any links to idiot-proof FAQs or tutorials on the STL?
Any & all help gratefully appreciated.
Cheers,
Douglas JL
If it don't make you laugh, it ain't true.
I've only just started really using the STL, and so am very unfamiliar with its workings.
I have, in the protected section of a class declaration, the following code:
list<string> itm;
list::iterator<string> ptr;
This gives me the following error:
E2102 Cannot use template 'list<_Tp,_Alloc>' without specifying specialisation parameters
Things work out fine when I try 'list::iterator<string> ptr=itm.begin()', but I want an iterator that's permanently in scope within the class. I assume that I need to let the comiler know just what sort of iterator I want (list) in my declaration so that I can link it to the list in the constructor.
Does anyone know how to do this? & maybe know any links to idiot-proof FAQs or tutorials on the STL?
Any & all help gratefully appreciated.
Cheers,
Douglas JL
If it don't make you laugh, it ain't true.