I’m doing a constructor for my iterator but I can’t figure what’s the default value
here’s the declaration :
const_iterator(typename map<TYPE, TYPE2>::const_iterator = ????? );
It’s a vector of maps, so my iterator will be a map iterator.
What would be the default value?
Cause when I do :
HashMap<TYPE, TYPE2>::const_iterator i;
It says that I have no appropriate default constructor.
Thank you!
Not going into why you would need a default value, I would suggest to use the default value of the map iterator (which is an invalid iterator)
Edit:
Considering your edit, it seems that most logical in your situation would be to overload your constructor. Have two overloads, one that doesn’t take anything (do what you think is best in that constructor) and your original one. That should do the trick 🙂