in a simple test program I am using typedef to keep things simple, but when I replace the typedef names with the longer original declaration I get errors.
The problem arises when I substitute pair<MapCode::iterator, MapCode::iterator> range = codes.equal_range(111);
with pair<constint, string> <multimap<int, string>::iterator, multimap<int, string>::iterator> range = codes.equal_range(718);
I can't substitute the typedef "Pair" std::pair<constint, std:: string><MapCode::iterator, MapCode::iterator> range = codes.equal_range(111);
without stumbling in an error (i.e. "Expected unqualified-id")
without getting error
I just want to fully understand the logic behind Typedef. I thought it was a simple substitution but these errors make me think otherwise.
Any clarification on the subject is greatly appreciated..
thanks! wow what a mistake.. ahah.. After I wrote the code I started substituting the typedef and now I see i got entangled in misinterpreting pair as the Pair typdef (which..yes I have to agree it makes no sense..). well, great, now everything makes sense again :)