Added: 2 years ago
From: TheNewIkast
Views: 10,218
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (15)

Sign In or Sign Up now to post a comment!
  • 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.

  • 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

  • You are not multiplying 0 * 0, because you didn't initialize the x,y properties. Those variables have random trash values.

  • 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

  • OMG! THANK YOU DUDE! if u were here right now i'd kiss ya! mwuah! :* lol.... great videos....

  • isnt there Set anf Get functions for classes thats built in?

  • @Anddos25 no

  • I was gonna say the same thing. If you don't initialize a variable, it doesn't mean it is 0 . It's just "Garbage" , could be anything aka Random

  • when you take off your Set_Values, x and y get random values in C++

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more