C++ 35 - Object oriented programming (Classes) Tutorial [PART 3]
Loading...
10,392
Loading...
Top Comments
see all
All Comments (15)
-
Polymorphism is a very important part of OOP you didn't go into.
-
Thanks so much, beautiful tutorials
-
Thanks man
-
thanks...for teaching us all...brilliant
-
One thing - variables must be initialized or they grab something in memory. Always set variables to some value.
-
A natural teacher. Simple and clear.
-
Hey Benjamin forget the wannabe critics.. good job on yur set of tutorials. Great for a newbe You've helped me understand many things I didn't before.
-
1) initializer lists
2) const correctness
This tutorial is missing both
Loading...
You are not multiplying 0 * 0, because you didn't initialize the x,y properties. Those variables have random trash values.
jovannyrodz 1 year ago 4
My name is Benjamin too!! That weirdo number is due to declared variables containing "garbage" not 0. If you sent out a and b to cout, you would see that they do not contain 0s unless you initialize them to 0.
bencin386 3 months ago