Bucky's shameless typos are what keep me coming back for more.
@eyalpery84708 жыл бұрын
Humans are attracted to confidence, this is why it's true! heh
@user-tv8cu6uk5u8 жыл бұрын
Hi, you might ask why I have contacted you.It is because I am also Christopher Holder .We Christopher Holders need to stay together.Even though you might think this is not real .It is.But I understand your doubt,because that is part of being Christopher Holder.Our duty is to find others like us.For the future of Christopher Holder.
@Lescopardi8 жыл бұрын
Magnus such Christopher. Much Holder.
@theseangle4 жыл бұрын
@@Lescopardi hold my Christ of Yerr
@ataladin873 жыл бұрын
@@user-tv8cu6uk5u what the hell did I just read??.
@robertburbulea85033 жыл бұрын
7 years ago, before high school, this playlist turned my life towards programming
@jonsierra7239 жыл бұрын
I understood this in 8 minutes and I couldn't understand in 2 hours of class.
@iosonoi.71326 жыл бұрын
Stupid professors don't know to teach. I hate going to class.
@vjosanazeqja58146 жыл бұрын
omg, same :|
@starinsky28736 жыл бұрын
And in sololearn takes 20 min lol
@shutdahellup694205 жыл бұрын
@Bo Ko idk man
@tuck5825 жыл бұрын
Three years later I just had the same experience as you...
@jasonhogan828610 жыл бұрын
These videos have helped me out a lot! I have been able to go through 14 videos in less than 2 days and completely understand everything in them!
@bryanswaggbeast81948 жыл бұрын
Ikr i thought i would never learn c++ but now I understand a little!
9 жыл бұрын
"What's even dumber than Lucky Bucky Roberts?" - Bucky Roberts
9 жыл бұрын
***** don't ruin it! It's just a quotation of what he said..
@xkilla9116 жыл бұрын
going to class for 2 hours and not learning anything vs watching this video for 8 minutes and learning everything.
@alexmrt68037 жыл бұрын
"Pretty cool huh?"
@theseangle4 жыл бұрын
Cool
@thechiller82114 жыл бұрын
Still cool asf
@jovandjokic42113 жыл бұрын
Crazy russian hacker
@ishowhalal3 жыл бұрын
almost was gonna type same comment
@jaabirahamedsaleem11122 жыл бұрын
@AlexMrt DaveHacks?
@gabinversace3336 жыл бұрын
This guy had just explained in 8 mins what my book does in 107898 pages that’s how it should be brief and direct good job man
@mohamedel-hadidy48445 жыл бұрын
Dude,I'm a student in computer engineering school and believe me you're way better than my professor I've been using your tutorials for more than a year either for learning new things or revising and actually you're the BEST
@theyoungone240910 жыл бұрын
So with a constructor, you basically give your variables a default value?
@yu-jyetung773010 жыл бұрын
yep.
@ClaudiuB7 жыл бұрын
yep, that's why it's called a constructor :)
@chrislee45316 жыл бұрын
but what's the difference between that and initializing a value to a variable?
@technicalguy56685 жыл бұрын
what is the value of default then?
@weou114 жыл бұрын
@@technicalguy5668 null
@GimliSonOfGloin7378 жыл бұрын
Bam wam thank you ma'am. best
@enduringwave874 жыл бұрын
Mam needs a BAM WAM
@MNiTwInInG12 жыл бұрын
Guys, Watch this Video ALL the times you think are necessary until you fully Understand. I watched it and Replayed it about 20 times, Worth It!
@Thatoneskymember2 жыл бұрын
These videos are so much more helpful to me than reading all the blocks on code with comments on other websites
@russelljames730310 жыл бұрын
automagically, best, word, evar!
@bryanswaggbeast81948 жыл бұрын
No bro it's automaticalyl Lol
@zeroisgawd14427 жыл бұрын
Correction to both of you "this will get printied automagicalyl"
@jmr2008jan8 жыл бұрын
For those confused, constructors allow you to assign a objects member a value when you create the new object, instead of assigning the value in the definition. YOU CAN NOT ASSIGN MEMBER VALUES IN THE CLASS CONSTRUCTOR AND THE DEFINITION! This is a important point. You must decide if you want to assign values in the definition or the constructor. If you assign the members a value in the definition objects created from that class will always have that value when created. Constructors allow you to assign a different value at object creation. In addition, constructors can set the values of private members not just public. You otherwise can not set private values from outside the class. Friend functions being a special case that I won't get into.
@Collegesheriff11 жыл бұрын
pretty much, yes, you can have many constructors, and depending on how values are given to a class object, it will choose the appropriate constructor to set those values.
@fernando30618 жыл бұрын
The way he explains things just make sense, clears so much confusion.
@Tazmondo9 жыл бұрын
"If someone puts cout inside a constructor then slap them round the face because they're an idiot." - Bucky Roberts 2015
@riaafridi35997 жыл бұрын
one thing i like most about bucky lectures that he deliver the best concept in short time
@administrator504710 жыл бұрын
Love your videos! Anything that I don't understand from a book I come here and you answer all my questions with your videos.
@tiaanadlem3 жыл бұрын
Great explanation. You have a great talent for explaining. I have been watching a few videos on C++ object orientated programming. You explain it the best by far. Keep up the great work bro
@MarijnKonings11 жыл бұрын
I had that at first as well, just keep researching on google and keep watching the video over and over again till you understand it to the point where you can explain it and it makes sense to you.
@TheSongbirdo10 жыл бұрын
C++, a million different ways to make a .exe say something
@dashcampower46224 жыл бұрын
How are u doing Fam
@hetaeramancer2 жыл бұрын
only a thousand
@nielsSavantKing3 жыл бұрын
"if somebody prints something in the constructor you have to slap him on his/her head!!" Yaaaa, that is the talking!! I love it
@lawmsangivarte50763 жыл бұрын
XD
@Kickasss11912 жыл бұрын
you explained in one video what my teacher, comprehensive book, and multiple online forums never could... thank you
@thanasis.malasidis9 жыл бұрын
Just saying but at 6:58 wouldn't this work even if the constructor override "Lucky Bucky roberts" with "Sally mcSalad" ? To show that each object has it's own value for name wouldn't it be necessary to call bo.getName(); after creating the second BuckysClass object, to demonstate that the second object did not change the variable of the first object ? Anyway, I really like these tutorials and as I am coming from C# I find them pretty easy. Thank you Bucky for the tutorials!!
@FingersBlazin8 жыл бұрын
This lesson is hard but worth it. I had to go over it many times and type it into codeblocks, write it out on paper and take notes, then write it out a second time with additional notes. People are asking a lot of questions because they are not looking at it long enough. Slow down and take in each sentence, repeat it over and over till u get it :)
@L8onL8on6 жыл бұрын
Thank you, this helped make the difference on an assignment of mine this week that I was previously lost on!
@XBR4Da9 жыл бұрын
why hasn't Google hired me yet?
@jigglywiggly64799 жыл бұрын
XBR4Da He doesn't like to work for sm1 else... He is just his own master... Check out his vlog where he said that.. :))
@samm48859 жыл бұрын
Marshall Mathers He said "me" not "Bucky" smh
@XBR4Da9 жыл бұрын
***** he prefers working independently i think
@nishantgurrapadi9 жыл бұрын
+Jordan Filipovski this comment made my day
@ibiixie9 жыл бұрын
+Marshall Mathers He works at google, at least according to his website.
@Wraki1236 жыл бұрын
Wow. I know this is a super old video, but just wanted to extend my thanks. Just started watching these and all the gibberish my prof has been saying is finally making sense:) thank you!!!!
@trakeC4 жыл бұрын
OMG thats what ive been doing wrong. I need to stop putting random words in the middle of my programs. Thank god for bucky roberts
@steam_vortex26088 жыл бұрын
You're an interesting guy Bucky; I love your videos and you're a great teacher, but I find it funny that you never type your cout messages in any literate context. Do you do that on purpose as a joke or are you doing it by accident? In either case it's funny as hell; you're a great coder and quite good at explaining things so it doesn't diminish what you're teaching at all. In any case thanks for posting these vids; I've already learned quite a bit from you. Keep doing what you're doing; cheers!
@PflanzenChirurg8 жыл бұрын
Agree :D
@roushangiri47228 жыл бұрын
Actually he does it because fro some lads computer programming is already so boring with hell lot of commands so he tries to make it interesting and also funny by give such remarks in his cout statement....
@PflanzenChirurg7 жыл бұрын
hahaha if ur skill stucks on a level it can get boring but its ur choice
@Amirzaki0076 жыл бұрын
well some people are kinda forced to take it as a part of their degree!
@PoptartChris6 жыл бұрын
Whenever I'm coding I'll always type something flippant instead of making real text like Bucky. For example, while I'm testing a program I just use strings like "poopgod6969"
@iiN1GH7M4R3ii6 жыл бұрын
"So remember not to put words randomly in the middle of your program or it won't run" ..... very insightful Bucky! For real though, thank you. Great video.
@TheRecocebo3 жыл бұрын
Thank you. You are the most Clear teaching Man of them all. With pretty cool accent and not doing showing off like the rest do.
@osamarizwan78746 жыл бұрын
Instead of using constructor to just set name, it is already done by setname function. We can optimize the code by just writing name = x in constructor. And the cout setname
@togmeister86049 жыл бұрын
2:44 everyone must now slap Bucky. Lol. You are writing in the constructor.
@n3onis7 жыл бұрын
Again, perfect. Constructors were another topic I couldn't get through completely.
@franciscopestana96710 жыл бұрын
I've started watching your videos last week and i've be able to improve a lot my newbie programming skills. Thanks a lot :D. Btw, if anyone wants to do some exercices (they helped me): Exercise 1: Write a class Square which has a field for side. It must have a constructor to initialize the side. Add methods to the Square class to calculate area and perimeter. Exercise 2: Write a class Circle which has a field for radius. It must have a constructor to initialize the radius. Add methods to the Circle class to calculate area and perimeter.
@alexandrac45826 жыл бұрын
Thank you for the exercises 🙏🏻 😊 ☺️
@lfethacarter7 жыл бұрын
watched this video at least 4 times, finally got the gist of it.
@MrEpicSpace8 жыл бұрын
I feel like an old person when I code in C++.
@normallytangent8 жыл бұрын
Okay, this is the first time I'm reading something called C++17. Your thoughts?
@iihuayra41498 жыл бұрын
+Chel Viz I feel the same and I had not even heard about C++14
@FingersBlazin8 жыл бұрын
Maybe because old people make game engines using c++? lolz
@Malluc8 жыл бұрын
I thought that in video game coding c++ is still a prominent language that is used.
@Malluc8 жыл бұрын
***** oh okay so what does that mean then? i mean you still have to code right?
@sylphid968 жыл бұрын
that name in 5:10 appeared automagicalyl
@emmanuel55lionbear8 жыл бұрын
2spooky4me
@bryanswaggbeast81948 жыл бұрын
+Sir Jova im pretty sure your looking at this video for making a sprx mod menu for gta 5 right? i know 2much4u!!!!
@emmanuel55lionbear8 жыл бұрын
Bryan SWAGGBEAST :O
@fwesh113 жыл бұрын
A good example of classes and objects is Pokemon. Pokemon would be a class with a general set of attributes that a Pokemon would have and a specific Pokemon (Pikachu for instance) would be an object of the Pokemon class that has the Pokemon template but with a bunch of specific values that make Pikachu a unique Pokemon. Then you would have other Pokemon objects, Charmander, etc. objects with the same Pokemon template but with different values for the variables. Thumbs up so others can see.
@isrj0111 жыл бұрын
you deserve some beers for all these tutorials
@GretoDaBoss11 жыл бұрын
Thanks bro, exam tomorrow and just decided to look up Constructors on KZbin and came across your channel...definitely subscribed now.
@ThePaniniboy12 жыл бұрын
If it helps, whenever I think of objects and classes and constructors I think of a game with monsters.Let's say we have a class is called makeMonster. It has a constructor that takes three parameters, a string, an int, and an image. To make it easy on the programmers, instead of having to set each of these individually for each and every monster they can do something like: makeMonster snail("snail",50,"snail.png") instead of snail.setName() snail.setHP() snail.setImage() to make the monster.
@TheKiloOhm8 жыл бұрын
Why in the constructor function you can't just say name = z? If the constructor is inside the class can't it just use the variable?
@dibbiepk12 жыл бұрын
2:40 "If you see anyone printing something out on the constructor, then there an idiot, and you should slap them upside the head" LOL!
@djsmurfen11 жыл бұрын
Bucky, when i graduate and get my first job I'm gonna donate a shit load of money to you.
@jbbauer013 жыл бұрын
Starting to get to the point where the stuff were learning could have some real uses in programming. I wish you had made a video around this point that would combine everything from the last 14 videos, and make a cool little program. That is why school helps you remember stuff better, is because the homework and projects etc. I guess I am going to have to think up a little "project for myself to do with everything ive learned so far.." Thanks for making these videos!!
@dmaster20ify7 жыл бұрын
Thank you Bucky now I make sense of constructors. What is a destructor (~)? Does it destroy the data we automatically gave the object?
@dimashur10 жыл бұрын
the first time i've encountered classes and constructors i was like no thank you, fuck programming. but once you program long enough you start to appriciate how organized everything is
@Rahoomba11 жыл бұрын
If you're confused by these class things, just keep on going until he starts using them a lot more again. Eventually you'll just be like "wow, I need to try understanding this again." I got to tutorial 50, personally, and watching this a second time around makes a world of a difference. I understand now.
@Fullstackdev-3 жыл бұрын
one of the best teachers on the tube
@AnOldSchoolG33K10 жыл бұрын
Now would've been a good time to introduce the term "Instance". bo and bo2 are each distinct instances of the BuckyClass object. The form and function of each are identical, but the values may (but don't have to be) different. Example: You have a class named Person you can have multiple people by reusing the same class... Person p1("Me"); Person p2("You"); We are 2 separate people, but we both have names, dates of birth etc.
@tanzimmostafa6 жыл бұрын
why cant u write z=x; instead of setName(z); also how come writing setName(z); works , setName was not defined first but rather later,so this should give an error.
@yugu60865 жыл бұрын
I'm also confusing about this, do u figure it out?
@tanyichun25354 жыл бұрын
Basically, everytime you wanna introduce a variable, you'd have to do " int a " or " string x " right? but for this case, x is a paremeter and not a variable, same with z. So you can't just say z = x at the constructor, would be fine for z = 'something else that is defined', same case as "name = x" since name is already defined with " string name" at private and x is the perimeter, but although z is a paremeter, x isn't defined.
@parzingtheasian6 жыл бұрын
every time he says "lucky bucky roberts" drink a shot Edit: also drink a shot every time he says "sally mcsalad" i followed my instructions and now im drunk XD
@VarunSharma-vc1yu3 жыл бұрын
"pretty cool huh?"
@JohnMarkIsaacMadison9 жыл бұрын
@0:55: Constructors do not have return type. @1:03-1:21: Constructor Name == Class Name. Always. @1:42: cout
@ashwanisinghtanwar29159 жыл бұрын
in name = x we have not defined "name", how come its not showing error... Please xplain
@pranavbanerjee86258 жыл бұрын
It's defined in private dduh
@sattikhalder7 жыл бұрын
Bucky is best he even leaves source code for us
@racheljeehye Жыл бұрын
HALLELUJAHHH!! the sun is shining the Church doors have busted open. You've helped me understand some serious misconceptions... thank you thank you
@AxelWerner12 жыл бұрын
Awesome inSHtructions! i like the SHTRING passing the most.
@MadOgre2212 жыл бұрын
Actually, I print stuff in the constructor all the time. I do it as part of the debugging process. When I write big programs that use RAII and there are a lot of objects being created. Sometimes the best way to make sure everything that was created got deleted correctly is to have it print the debug information to the console. Obviously this stuff is later removed in the final program.
@TwoLazyTurtles11 жыл бұрын
Thanks bucky, Im reading "C++ Primer" the section on constructors was hard to understand. I watch your video tut and with one line it all came together "A constructor is a function that gets called automatically as soon as you create an object." Simple.
@sidharth.19525 жыл бұрын
I'm reading primer too Just started it Is it worth reading? Pls give your opinion
@sandy19959 жыл бұрын
Your examples are amazing! Great Work Sir Bucky!
@SportGrounds6 жыл бұрын
I love your teaching style Bucky!
@rafaelermel11 жыл бұрын
I love how you pause everytime between the words "Lucky (..) Bucky (...) Roberts!" XD
@priyansh12109 жыл бұрын
SIr, In your 43rd tutorial on deconstructors, you said that deconstructors can't return a value and can't have a return type. I want to ask that can a constructor have a return type(void,int.etc) or can it return something?
@kyuyoungshim99407 жыл бұрын
A really good demonstration...You are just amazing
@ViceSyndicate10 жыл бұрын
Does it matter wich order you write the code in " BuckysClass " ? Could you first set " String name; " to private and then do the public functions to acces name?
@TheAsphixiator10 жыл бұрын
Yes. You can do that. It's the same thing.
@voltaquake13 жыл бұрын
@valid4ever Yes that is true, once you make the object and pass it a string, then the name will be that string. However, sometimes you may want to change the name in the middle of the program and so with the setName function, you can still change it.
@ChillzYouTube7 жыл бұрын
6 years ago this sexy video was uploaded.
@hershsangani93026 жыл бұрын
Anyone else hear Charlier (Trip) Tucker III's voice from Star Trek: Enterprise? This is what Trip probably did before he left for star fleet...Thanks, great video!
@taylorclark54859 жыл бұрын
Bucky, you're hilarious. Definitely make boring material enjoyable!
@haroldmcbroom78072 жыл бұрын
A note on cin... // cin extraction stops reading as soon as it finds any blank space character cin >> fnam; // using getline offers a solution to this problem. *(see below please)* string mystr; cout
@jemaiwadhah64238 жыл бұрын
Buckys make it so easy to understand
@matthewnaylor58948 жыл бұрын
When using a constructor to set initial variables for an object, does the constructor really need to use the public functions in order to do so? (analogy time: Isn't this like an employee using the customer bathroom instead of the employee bathroom?)In theory, couldn't/shouldn't the constructor just set the values for the variables directly since it's within the class? Also, does the constructor need to be in the public part? Thanks.
@wejnc9 жыл бұрын
Hi just a quick question, isn't BuckyClass(string z) : name(z){} the best way of doing this? That way variable will be written once instead of twice and also will be useful for const and reference member.
@inspiredchild2329 жыл бұрын
Hey Bucky, I have been watching your vids and I'm loving em. Thumbs up! I have a concern though. At 2:24 you called "bo" an object which it is of the class BuckysClass. However, at 3:48 you call it a constructor by saying a constructor can have a parameter. I'm confused! Did you mean an AN OBJECT can have parameters or a CONSTRUCTOR (because "bo' isn't a constructor)?
@axtyab9699 жыл бұрын
I believe the constructor acts as a way to give paramaters directly to a newly made object. bo is an object, but because the constructor inside BuckysClass asks for a string paramater, you pass it a string through the bo object. But if im wrong, please correct me.
@ThePositiev3x9 жыл бұрын
since the name of the class and the name of the constructor are same and once you create an object you automatically call constructor function, he said so
@dibbiepk12 жыл бұрын
Hey, QLHanz, Im a bit new to programming myself, and yes, as you move forward through this stuff, it will get more harder, but in reality, it really isnt THAT hard, just replay the vid a few times until you fully understand it, then and only then will you be able to advanced to the next video, young patawon, or programmer in this case :P
@KARAB1NAS8 жыл бұрын
the function "setname" is defined below the constructor. why the compiler still compiles that? I would expect the function to have been defined before the constuctor for the compilation to work...
@FingersBlazin8 жыл бұрын
Everything happens in order. main() runs first, sees BuckysClass, and passes the parameter "Lucky bucky roberts" to the constructor. Then the constructor uses the function setName to assign the parameter "lucky bucky roberts" to the name variable. Then it goes back to
@Elegyofawesomeness7 жыл бұрын
What he says about objects is SUPER important. Remember, you're creating an instance(copy) of the class, NOT a link to the class itself.
@muhdfaizal67269 жыл бұрын
Helped me a lot! Cheers Bucky!
@0x1EGEN7 жыл бұрын
Is there a way to loop through an array containing classes with inheritance? Like lets say I have a "super" class named "A" and create subclasses that extends A named "B" and "C" and suppose that they have different methods. and so if I create an array of classes "A" and put elements that are from "B" and "C", that would mean that each elements in it are different byte sizes, meaning I can't use for (int i=0; i
@icebreakerek2 жыл бұрын
Take a drink everytime he says "Lucky Bucky Roberts".
@ammarqs9 жыл бұрын
HI bucky, Thank you very much for these awesome courses you are providing on your website and on youtube. I would like to know if there is any book you would prefer as a reference guide while doing C++. Something that you would use as a reference and learning guide. Thank you
@awesomelemonade12 жыл бұрын
I opened the program exactly when bucky did!
@JamesBrodski4 жыл бұрын
Great video as always! I learned a lot. Thank you very much.
@ShaunMunsey10 жыл бұрын
These tutorials are excellent, thank you!
@prvnpn21611 жыл бұрын
Thank you for saving me from digging into books for hours... Lotta love:D
@alexgomes96806 жыл бұрын
Can you not set the 'name' to a string inside of the constructor without using the function 'setname'? As far as I know, the private variable can be accessed by the constructor. Any help is appreciated, thanks!
@kingjbc111 жыл бұрын
Well they do you different compilers on default sometimes. Visual Studio 2010 for example uses the VS 2010 Compiler and Codeblocks uses Mingw, but these can all be changed with relative ease.
@rinkusamanta10656 жыл бұрын
2:43 i slapped my techer coz of bucky
@pastitsio7 жыл бұрын
So, are the functions in public section of code created in parallel? Because sequentially the constructor is created before the "setName" function, yet it is used in the constructor. Also, the setName function is not prototyped.
@nightprogrammer74748 жыл бұрын
bucky i have a question does anything change if i dont set my function and string to get" " and set" " or it definitly has to be Get " " and set " "
@pacochamorro-fierro1225 жыл бұрын
is it possible to have more than one constructor to handle exceptions? Let's say I have an Object1(string, int) and I have Objetc2(string, float)
@hwudiwkbwhsysiwkmwbsoslkwaauyy10 жыл бұрын
For mac users, I reccomend using the eclipse C++ plugin, it's really good, and works a tonne better than Code::Blocks for mac.
@TWolfguarde11 жыл бұрын
Not so much. It's more a thing of consolidating what you already know. It's tempting to just power ahead (I do it, even though I shouldn't), but you'll probably learn a lot more, a lot faster, if you sit down after every few tutorials and look over your code, work out what you can do with it, and write a couple of simple programs of your own without the tutorial to help. Working on your foundations will make learning the rest a lot easier.
@Qazqi11 жыл бұрын
std::cin is an object that represents stdin, not a function. The >> part is the function (which overloaded operators are) that reads in data.
@A7medMSD7 жыл бұрын
1:03 "and the constructor name is always the same as the class name ,the exact same " - Bucky the Rapper :p