inc/dec operator return a pointer?

Programming, for all ages and all languages.
User avatar
eboyd
Member
Member
Posts: 97
Joined: Thu Jul 26, 2007 9:18 am
Location: United States

Post by eboyd »

thanx, i suppose that's what an iterator is, right? so is there an advantage to using iterator to perform such operations?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

eboyd wrote:so is there an advantage to using iterator to perform such operations?
Ehm... for example in those cases where you want something that looks like a pointer but actually is an object (for which you can overload operators)... i.e., in your very case.
Every good solution is obvious once you've found it.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

eboyd wrote:thanx, i suppose that's what an iterator is, right? so is there an advantage to using iterator to perform such operations?
Yes.
Post Reply