C++ 104 Classes Part 1

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
16,617
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 31, 2008

NOTE: When I am talking about what "public","private" and "protected" mean the second one I explain is suppose to be "private" not "protected" like I say in the video. Slip of the tongue.^^ So to be clear, "private" is the highest level of security, and "protected" allows the derived classes access. Thanks to GPadd for pointing that out^^

Classes are WAY to huge a subject to be done in 10 minutes, but I think this is a pretty good intro. Much more to come! Place let me know if this has raised any questions and feel free to comment as well^_^

PS very sorry for the quality of the audio in this one, it's late, I'm tired and apparently I make sharper S's when I'm tired. My bad.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 8 dislikes

Link to this comment:

Share to:

Uploader Comments (ryutenchi)

  • int main(int argc, char* argv[])

    Why do you have to specify those parameters for the main function?

    What does that mean? I usually just do:

    int main()

    PS: Great music! I really like Massive Attack

  • @11889music They are the way to access the arguments passed into your program from the command line. argc is the number of arguments passed and argv is the array of arguments separated by spaces. argv[0] is always the name of your prog (in this case argv[0] would be "game") and then the first actual arg would be argv[1], so I could have made it so that I could have passed the char name by command line. if(argc>1) me.setName(argv[1]); or something like that^^

  • No actually the #endif needs to be at the end of the definition/declaration or else you make have instances where you'll get errors about the double-def. because A.cpp includes both char.h and b.h but b.h also included char.h so when the complier brought all the code together if that #endif wasn't at the end of the file it would put the code for char.h in twice... which is the double-def error^_^

  • thank you for posting this, but do you know how to get the source code from a program, i am trying to see how people made a genetic algorithm for the traveling salesman problem, and i want to see the source code, can you help me? give me any tips or anything i would turly appreciate it

  • There are what are called disassemblers out there that you can use to disassemble compiled code into what is called assembly code and then you can translate that into c-pseudo code to make it easier to read. this is what we did for the broadcom driver, but it's been a while so you will have to google it, sorry. hope that was enough keywords to help you get started.

  • You repeat what protected is two times, but as I understand it, the first explanation is about private. And the second is about protected.

    Or am I wrong?

  • you are correct, I do that sometimes. I'll make a note in the notes. Thank you for pointing that out^^

see all

All Comments (35)

Sign In or Sign Up now to post a comment!
  • stfu n erd faggot get a new mic

  • you are person

  • I miss that compiler!

    Visual is so bland.

  • Jesus christ man take the fucking mic out of your throat.

  • my ears too with headphones lol

  • massive attack \m/

  • What flavour of Linux is that dude?

  • dude check your audio please before uploading ... you almost shredded my speakers!

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