Added: 2 years ago
From: papano12
Views: 17,659
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (64)

Sign In or Sign Up now to post a comment!
  • man I swear i never understood what classes are! YOU ARE MY HERO! love you!

  • Thanks.  I was having trouble understanding this topic. I have a crappy professor.

  • well done, and helpful. Thanks

    

  • can someone tell me whats the different in Classes and Structures?

  • THANK!!!!!!!!!!!!!!!!!!!!!!!!!­!!!!! you

  • WDF!!!!!!

    Does this program convey complete concept of classes......?

  • Thanks! I already know Java and I was just looking for a quick and easy video to learn syntax...you hit the spot!

  • thanks for this tutorial! I finally get it!

  • Bro this helped me out big time. Also I have a question, what is the difference between a struct and a class? They seem the same to me. Aand last question: When and where should I use the private (function?) in class? Thanks again!

  • Thank you very much. I was having trouble understanding classes, but you manage to explain everything perfectly.

  • yea a class is basically a set of rules for the compiler to follow when it creates an object for it.. that's why there is a header file. the source file explains more in detail how the layout(implementation I think?) works.

  • @iceshadow625

    yea sorry. its interface, that's the header file. the implementation is the source file. my badz

  • You taught close to 11, 000 people the wrong thing.

    (You aren't "changing warrior to t" - you're making an object (I think that's what it's called) of the class...

    It's very different and easy to explain)

  • @Thetimpson You think thats what it's called? Come back when your sure with more facts before you start taking rush actions. This is a beginners tutorial, before going into more complex its better to learn shortcuts around the base...

  • @papano12 That is most definitely not a good way of learning.

    Please don't be stupid. I don't know much about classes in C++, which is why I watched your video, but I do know that you aren't simply changing the name. I'm 90% sure that you make an object of the class, which means that the object's name (in this case, "t") can access/use all the class (of which it's an object of) methods.

    Having said that, I think your video is still very good - I just don't know why you explained wrongly :)

  • @papano12 technically its both. You're technically making an instance of Warrior and calling it t

  • @papano12 thanks for this tutorial.

  • I learned it from the ground up -> and as a result didn't have to worry about bad habits that I'd need to unlearn, IF any exist.

  • @papano12 The reason I'm here is to learn... Obviously.

    But if I spot something that I think's wrong... I'm gonna query it.

    And I disagree, you're just making it harder for the students, because objects and classes are considered the basics of C++ so it's best to learn it straight up, rather than beating around the bush.

  • @Thetimpson 't' is indeed an object. The example should be like this:

    the name of the class should be "character"

    and the object's name "Warrior" that has ATTRIBUTES inherited from the class it comes from.

    In another way. instead of 't' you should write "Conan" which again would be on OBJECT of CLASS:Warrior and having the attributes of the class (health etc) he is from :)

  • @Thetimpson

    yea it's declaring t as an object of warrior.

    but I don't understand why there is a semicolon after void attack..it's not just a declaration, its a definition too, so yea I see there are some things he could have done differently in here. lol.

  • @Thetimpson why don't u make a tutorial instead of just saying shit?

  • @LeonardoKasperzioni I actually plan to...

  • many thanks 

  • Consider indenting the curly brackets to match the method's indentation.

  • thanks, that was quite simple and easy to understand.. I was always overhelmed when seeing others classes explanations.. do u have any more tutorials on classes?

  • This helped a lot. What program do you use? My teacher makes us use Microsoft Visual Studio.

  • @Insanox2 Dev C++

  • What's the object part of the class? is it the cout part in the class closed by brackets or the functions in the class that provide you to use t.health and attack in main?

  • This was pretty easy to understand, and it was straight forward. Nice!

  • nice for beginners. tho i rather object orient program in c++. makes it much better looking and easier to find.

    Thats atleast what ive learned is the best way to do it.

    2 diffrent files, one .h & one .ccp. Header got the info & ccp file got what ur class actualy do.

    Public: void LoseHealth(int amount);

    Private: int health;

  • i wish you taught my cs class instead of my professor.

  • thx man made lot of sense!!

  • Thank you so much, I've watched an unbelievable amount of other tutorials on classes but they just didn't make any sense. ty ty!

  • This tutorial is great.

  • members should be private

    methods should be public

    methods should manipulate the members.

  • shit i always wanted to know what that dot was for!

  • very nice and well explained!

  • do you also have other tutorials .... i understand you man,,,

  • Thanks alot was really easy to understand

  • thans a lot

  • I friggin love you!!!!

  • wow you are really good at teaching :D this made everything so much easier to understand with classes. but the whistle in your voice really annoyed me :P

  • you are god

  • you are a great teacher!!!

  • oah.... big, BIG thanks!!!

    i am reading a book about object oriented programming with C++

    but before I watched this tutorial I'd never understand that. :)

    and I have to say you that I think all your tutorials are very, VERY good!

    thumbs up!!!

  • Thanks. This was great

  • too easy to understand,,,, great explanation , thanks

  • This was much easier to understand then most others i've watched. Thanks!

  • @CrackahJackJoe Np, anytime.

  • Great short tutorial.

  • thanks!

  • very nice!

  • @bloodfoxtrue Thanks, I like to keep it simple.

  • Thank you for this:) Been trying to understand this part for a few days. Keep up the good work!

  • good video

  • I was having some trouble on this. You broke it down nice with the 'Warrior' example. Cheers!

  • one question...why do you prefer dev-cpp environment? Don't you like more code blocks ore something?

  • good work!

    thanks for posting

    i have learned a lot :)

  • very good!

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