C++ Tutorial: Operator Overloading Part 6 - Increment and Decrement Operators

preview_player
Показать описание
Part 6. In this video the prefix and postfix inrcrement and decrement operators are overloaded for the Vector2 class. The nature of the operators are explored and implemented as class member functions using specific syntax. Also demonstrates chaining increment and decrement operators.
Рекомендации по теме
Комментарии
Автор

That was really helpful, you really went through eveything that mattered to understand this topic

brainloading
Автор

Helpful videos, keep up the good work !

robertfreeman
Автор

I still don't understand why you had to return a vector2 object instead of a reference in the definition of the postfix operators. And how come you return (*this) instead of (this) in the prefix operators? Should the return type be a reference?

fosheimdet
Автор

You failed to show what happens when sending a vec1++ to the output directly, to compare it with what happens when sending i++ to the output directly - that would complete the picture. Otherwise a nice tutorial.

frankjakobsen
welcome to shbcf.ru