Premium Only Content
 
			Operator Overloading (Custom Vector Class) - C++ in 2021
In this lesson, we create an implementation of our own Vector class! We do so in the context of learning operator overloading including:
Vector Addition
Vector Subtraction
Vector * Scalar
Vector / Scalar
Comparison Operators
Conversion Operators
OStream operator
Type wrapping builtin functions
In the end, we'll have a class implementation that will be usable in your own game projects!
Professional C++ by Marc Gregoire: https://amzn.to/3eVMlaU
Chapters:
0:00 Intro
0:35 Follow ups from last lesson
2:50 Code Cleanup
3:55 Create Vector3 class
5:18 THEORY - Operator Overloading
16:50 +(addition) Operator
19:00 - (substraction) Operator
19:50 ostream operator
22:37 First usage / test
25:08 Vector * Scalar (Multiplication) operator (RHS)
26:05 Vector / Scalar (Division) operator (RHS)
27:37 Changing your Left Hand Operand (Multiplication)
29:50 Comparison Operator Overloads
35:00 (BONUS) Type wrapping for overloading builtin types
- 	
				 1:37:39 1:37:39Ozzadar - Game Development3 years agoVulkan Vertex + Index Buffers | Cross Platform Game Engine Development812
- 	
				 1:05:12 1:05:12Michael Franzese2 hours agoI Waited 50 Years to Tell You What Happened on Halloween 19758.58K2
- 	
				 1:07:15 1:07:15Candace Show Podcast2 hours agoINFILTRATION: Charlie Kirk Was Being Tracked For Years. | Candace Ep 25628.8K86
- 	
				 LIVE LIVERallied1 hour agoWarzone Solo Challenges then RedSec Domination83 watching
- 	
				 LIVE LIVERed Pill News3 hours agoBoomerang Time - DOJ Investigating BLM Fraud on Red Pill News Live3,489 watching
- 	
				 1:46:14 1:46:14Roseanne Barr4 hours ago“The Over Emotional Are Always Under Informed” | The Roseanne Barr Podcast #12162.9K25
- 	
				 LIVE LIVENerdrotic5 hours ago $5.48 earnedThe WitcHER DOA | Box Office Massacre | Massive Industry Layoffs - Friday Night Tights 3781,361 watching
- 	
				 14:54 14:54IsaacButterfield13 hours ago $0.95 earnedShe Called Out “Creepy Men It Didn’t End Well12.8K33
- 	
				 LIVE LIVELFA TV21 hours agoLIVE & BREAKING NEWS! | FRIDAY 10/31/25680 watching
- 	
				 1:08:42 1:08:42vivafrei4 hours agoEric Swalwell in Trouble Again? RFK Jr. "Reverses Course" on Tylenol & Autism? Arctic Frost & MORE!76K27