Completely irrelevant. Whether the method is called inc() or operator ++, whether it's called add() or operator +=, the principle is that there are cases when incrementing makes sense, but adding...
Type: Posts; User: CornedBee
Completely irrelevant. Whether the method is called inc() or operator ++, whether it's called add() or operator +=, the principle is that there are cases when incrementing makes sense, but adding...
No, it is not. It is a logical consequence of the fact that these classes, by design, do not support arbitrary jumps other than by repeatedly using increment. It makes sense, it's intuitive.
I don't...
Have you tried my example yet? There are classes that quite reasonably overload ++, but not += or +. Using x=x+1 with those results in a compile error.
I do ask. How do you do symbolic constants...
Try this one:
std::list< int > ints;
ints.push_back(1); ints.push_back(2); ints.push_back(3);
for(std::list< int >::iterator it = ints.begin(); it != ints.end(); ++it) {
std::cout << *it <<...
It's interesting that you claim the linked list standard container, as well as instream and outstream iterators are poorly designed. Personally, I don't think so, but I'm sure you know what you're...