Bucky, you must have heard/read this a thousand times, but I'm gonna say it again. You are a hero. Seriously, I really appreciate what you do! I'm not done with my Bachelor degree yet, but if I ever make it, it will be thanks to you! My teacher is... Nothing close to a teacher. So we have to learn this stuff ourselves. Couldn't have done it without your tutorials.
@waldomonroy4523 жыл бұрын
Did you ever finish your bachelors degree my friend?
@alexdoodd11 жыл бұрын
I've read 250 pages of C++ textbooks and 42 tutorials in one day... I should probably sleep
@Howtodothatshit10 жыл бұрын
***** Too much dedication, you body and brain needs to sleep to keep track of what you've learned throughout the day. If you stay up for too long, you won't remember much of it when you wake up.
@lastofthestars64817 жыл бұрын
holy cow bro hahhah :))))
@ROVAKAN6 жыл бұрын
this dude wrote it 4 years ago , he must be a bilioner right now acording to his dedication :)
@shahmeer9116 жыл бұрын
So how's it going now a days
@nepalihercules6 жыл бұрын
instead of doing that, it's better to just do 4 of 5 tutorials and try to to use them in examples.
@jared080113 жыл бұрын
The way you said "A pointer isn't the same thing as an object" just made my day xD
@AlphaCrucis13 жыл бұрын
I'll go to bed after one more tutorial! It's like I'm addicted to these!
@waldomonroy4523 жыл бұрын
Same. Did you learn the concept well and are you still coding today??
@AlphaCrucis3 жыл бұрын
@@waldomonroy452 I didn't really continue with C++ specifically until a few years later. I am still coding today for work and for fun, though I still don't feel anywhere near being an expert.
@TheVideoVolcano Жыл бұрын
Coming to 12 year old videos to learn because bucky is a phenomenal teacher.
@glennjoecy7 жыл бұрын
Very clear as usual. Copy/Cut is the Edit menu (right click)
@areg71829 жыл бұрын
Bucky, Idk how the hell can u make ur videos so that i dont get bored. i watched 20 of them today!
@CinghAnkit6 жыл бұрын
for guys having problem during compilation .here is the solution . open codeblocks --> create new project-->choose 'console application'-->write the name of your file-->then goto file -->choose 'class'-->uncheck the buttons as told by bucky-->click ok-->on the left side of the screen you can see your file name with codeblocks logo and two subfiles under it 'sources' and 'header'->to create the main you just need to click on the source and you will see there is a main.cpp file already created-->just open it-->you will see bunch of codes there,erase them and code! like this so that other people can refer to it as this comment is very lately written.
@mohammadbadruzzaman106710 жыл бұрын
People who are having problem with "undefined reference to " error, please uncheck "use relative path" check "add path to the project" check "header and implementation in the same folder" It solved my problem
@Sevendogtags10 жыл бұрын
Thanks a lot man! I didn't uncheck Relative path and I was getting this error so I took a look at comments you solved it! :P
@Sevendogtags10 жыл бұрын
btw, anyway to change the settings of an already created class or do I have to recreate it if I did something wrong like this time?
@jaycobea761010 жыл бұрын
thanks bro!
@MrInfoJoe10 жыл бұрын
***** ty this solved my issue too, but could you explain why not having that box checked solved the issue. Thank you for your time
@JoelDzs9 жыл бұрын
+Zaman Shakib DUDE YOU ARE A LIFE SAVER !
@M_Hamza7 жыл бұрын
pretty cool..huh?!!
@RadicDotkey7 жыл бұрын
This is the most important lesson. A quintessence of C++ Thanks for that.
@MontSteve3610 жыл бұрын
Actually the is a Copy on that menu. Right click>Edit>Copy. I am really getting a lot out of these tutorials. Thanks a lot. And God bless you.
@NecroPhase110 жыл бұрын
I finally managed to fix this error by deselecting the "use relative path" option and setting the file path to the 'include' folder located within program_files/code_blocks/MinGW (or whichever compiler you're using). Create a project and add your .cpp file before creating a new class. Go to project/build_options/search_directories and add a new search directory leading to the same 'include' folder as before. Once this is all done a new class can be added. It should be automatically created in the 'include' folder where the compiler will now look and should find the header file. Hopefully this sorts the problem those who were confused about it.
@Deathfang8910 жыл бұрын
csharp/java programmer here. @ 7:47 I still don't see the benefits of calling a function through a pointer... Why would it be better to do so exactly?
@thesickbeat12 жыл бұрын
it'll do the same, but it the difference is is that the latter one is accessed with the dot operator and the first one with the ->. The reason why -> exists is to make it more visible whether it was used by a pointer or an object.
@73igStar13 жыл бұрын
Thank you so much for these immensely helpful tutorials!!
@waldomonroy4523 жыл бұрын
Are you still coding today?
@TheHTMLCode12 жыл бұрын
If you created your class through the class wizard this should have been done automatically, but glad you resolved your problerm!:)
@lutescutudor12 жыл бұрын
Awesome. Just subscribed and plan on learning new things on your channel. Thanks for the amazing work.
@ildottore210 жыл бұрын
codeblocks 13.12: People who are having problem with "undefined reference to " error uncheck "use relative path" uncheck "add path to the project" check "header and implementation in the same folder"
@zeeshiscanning12 жыл бұрын
thank you bucky, i was getting tired of Arrow Member Selection Operator but you made it cristal clear.
@nutellablop12 жыл бұрын
This tutorial is the answer to life, the universe, and everything.
@vbukhari8613 жыл бұрын
hey Bucky, you have done great job with this tutorials....thank you very much from one of Gators.
@waldomonroy4523 жыл бұрын
Are you still coding today?
@SerhatAtes5 жыл бұрын
nice to mention here: (*sallyPointer).printCrap() is equal to sallyPointer->printCrap(). dereference stuff...
@onelerv113 жыл бұрын
@vbukhari86 printCrap was defined as a function specifically for the Sally Class.. So if you ever want to use the function you have to use the object accessor (which is either . or -> depending on rather its object is on the free store or not) But to answer your question he defined printCrap in the Sally class so he can only use it through an object of that class.
@forcebewhithyou947 жыл бұрын
If you include this in your .h file, Bucky you are able to used in any cpp who use this .h #include using namespace std; no need to declared in any other place. Your tutorial are really good, thanks.
@theronster3459 жыл бұрын
Thanks Bucky So helpful. I enjoy your welcoming voice and humor. Excellent Character as well.
@OnTopOfDreams11 жыл бұрын
really appreciate going over the whole process of class n object to refresh my mind. Great Vid
@kareemtawfik2886Ай бұрын
U r the best bucky i wish you are my professor rather than my professors 😂
@viandare10 жыл бұрын
I like your engaging way of teaching I will take action...........
@rodrigueskorn12 жыл бұрын
MyFFfanatic, I don't how to pay you this, but know that you clarified my mind, you open it. Thank very much. I had created the files, but they were not indeed in the same project, they were just in the same folder, as you said that was not enough, then I could see, because you helped me.. Thank you one more time.
@asfadasfa123413 жыл бұрын
Also for anyone who doesnt know, if you wanted to create a pointer without the original object, you could do this. Sally * sallyPointer = new Sally; btw thats also how you do dynamic allocation. but if you do that at the end you want to put delete sallyPointer;
@madhavsuri43967 жыл бұрын
I like the mimicry part :) some people are waiting to make us make trivial mistakes and then jump on us (lol)
@sergeantseven42406 жыл бұрын
Did you have a couple beers before making this? lol Thanks for these, great for refreshing my memory.
@theblobber44616 жыл бұрын
If "undefined reference to"-error occurs, first of all try: -in main.cpp add also: #include "Sally.cpp" If this not works try: -uncheck "use relative path" -check "add path to the project" & "header and implementation in the same folder"
@joshnichols96679 жыл бұрын
these videos are fantastic, on a side note i hope you have improved your diet
@pkflyers12 жыл бұрын
They usually are a precursor to using Linked Lists, as many use Linked Lists within classes
@Ravushika0112 жыл бұрын
I had the same problem too, I solved it including the start of the "main" the instructions: # include "Sally.h" # include "Sally.cpp" and works fine
@faisaltushar7744 жыл бұрын
Your comment helped me a ton after 7 years of making it. Thanks a lot.
@MrBumpalicious12 жыл бұрын
Yeah, you can CTRL+V. Which is what buck does. he said "Code blocks dont have a Paste option" so i was just giving him a tip or what-not.
@Telseilong14 жыл бұрын
@conorucd that a hot key to copy yes but those are common to most windows applications. I was more talking about the Right Click Menu . Code-block puts all the copy cut, paste under the sub-menu Edit.
@lunatunny75947 жыл бұрын
Arrow member tutorial begins at 4:22
@xthlon13 жыл бұрын
@iamawesomelessness i believe the * tells the compiler that it is a pointer and not a variable, int *p would be a pointer int p would be a variable
@XGazudin12 жыл бұрын
Jesus!! That's exactly the problem I was going to ask about here, thanks man you saved me some trouble. Still, there is one thing bugging me: In the last video about header files n stuff, I had the same problem. I "solved it" by actually creating a project within code::blocks and going through the video again, and it worked. And tbh, I think that's some stupid shit. Why would having the files in an actual project make such a difference? The code is identical after all
@jrose68919 жыл бұрын
Nice Deuce Bigelow reference, Bucky. :D
@bohterham13 жыл бұрын
@Aireavix haha achievment unlocked: First bucky commenting + 20 Gamescore
@irfanete8 жыл бұрын
I did everything same according to video he showed but when I go run it...shows error message "" Undefined reference to Sally:: Sally ()" But Why?? I did everyhting whatever he did in video..Could anyone explain please !!
@parthgoel61515 жыл бұрын
maybe its too late to answer but still. you should create a program in a project and not like directly making it from an empty file. I was facing the same error
@klodiqoshku43155 жыл бұрын
@@parthgoel6151 not that late.maybe you cant help him right now,but helped me.
@this_is_mac5 жыл бұрын
@@parthgoel6151 You are freaking late man!!! I was searching everywhere for this problem for about 1 hour
@this_is_mac5 жыл бұрын
@@parthgoel6151 Thanks btw :D
@this_is_mac5 жыл бұрын
@@parthgoel6151 Thanks btw :D
@jamesaylward23037 жыл бұрын
To copy with clicking in codeblocks, right click and then go to the edit sub tab. It's there
@unison197810 жыл бұрын
that part before 2:30 was not explained very clearly, I had no idea what you was talking about... Could you please go over it for the layman?...
@aperson40515 жыл бұрын
Anyone know in which tutorial he explains why you would want to use the arrow member selection operator?
@Ishihok13 жыл бұрын
@Mr1naruto You indeed speak truth. I am only started watching the vids because i knew bucky would give me a better explaination about pointers than this book i am reading. Once I am done here I am going straight back. He did a wonderful job with this stupid subject, hopefully i will learn why pointers are worth their time soon, although it is interesting passing address into parameters.
@sagargdeshpande13 жыл бұрын
@Bucky @1.23 you say there is no copy ,goto (right click) to Edit there you have the option.
@lauro1994719 жыл бұрын
did somebody say steak? lol
@Johnybogo7 жыл бұрын
this is what makes his tutorials the best, the names he gives are just hysterical.
@imackshungames43047 жыл бұрын
Chie would be proud.
@bredmond8126 жыл бұрын
"I love steak." -- Commander Shepherd
@samirgunic8 жыл бұрын
1:17 Yes there is?! Just go to the Edit submenu, select Copy and be happy.
@somasarkar20087 жыл бұрын
lol
@Nahiyan1213 жыл бұрын
@QuicK2800 Maybe, you were viewing the tutorials where Bucky was using Dev C++ and accidentally you click this video if I am not wrong.
@VedantMishra555 жыл бұрын
yeah
@Jakobpb12 жыл бұрын
You are a gentleman and a scholar.
@AbdelmajidZahmoul10 жыл бұрын
Somehow i had the error in the latest version of Code::Blocks, but when i switched to the 10.5 version that he uses here the code run perfectly guess they changed some check-Boxes or values in the class creation box
@Qazqi11 жыл бұрын
Just what they are in math: a way to change the order of operations. Or do you mean the ones used to call the function?
@MontSteve3610 жыл бұрын
I have had trouble getting either on of these external class programs to run. The problem lies in the #ifndef statement. replace those three lines with on line at the top #pragma once. This does the trick.
@CCNezin113 жыл бұрын
@eclecticatdesign I realized a while after that you have to create a project and add all of those files to it in order for this to work correctly.
@MrBumpalicious12 жыл бұрын
Code blocks does have a paste option. Right click >> Edit >> Paste.
@doublewhopperjunior9110 жыл бұрын
After years of trying to figure out error: 'class A' has no member named 'printA' I have come up with the solution. Create new project file -> create new class -> uncheck "use relative path" -> set the file location for the folder ( you have to double click where you folder is, I skipped this step and I was about to give up ) Make sure under projects tab to the left, under sources, your main.cpp and your class .cpp file is there
@TheHTMLCode12 жыл бұрын
Ahh right! I was confused, thought you did not know the paste short cut hehe
@popocraft46775 жыл бұрын
6:47 why are the letters different on the rows?
@TheHTMLCode12 жыл бұрын
Hey what IDE are you running? Im not sure what code blocks looks like but Im running visual studio 2010 - if you created your class properly via the wizard you should see under source files folder "main.cpp" and "class.cpp" under your header section you should also see "class.h", if you did not save these into the same location they will not be there, in which case you should seek them out in your directory and use #include"../../class.h" to include them into your program!
@hajrafarooq28706 жыл бұрын
youre surely a big Mc fan xD
@MrSalehovich11 жыл бұрын
Probability researches concluded that if you get a sample of 50 people or more, your probability of finding two individuals with the same birthday date is almost 98%. So if you are in a party with more than 50 people you can bit on this and have yourself a hundred bucks ;). (By saying the same birthday, i mean the same day and the same month, but not the year of course).
@rodrigueskorn12 жыл бұрын
Thank you for helping, but all the files are in the same folder since I have created them. All the headers files are correctly put, but the problem still happen. I changed the compiler MingW for Borland 5, just to see if the problem was on the compiler, but the problem is there. I can't figure out what it might be. After I having changed the compiler, the error is almost the same: "Error: Unresolved external 'Sally::printCrap()' referenced from 'D:\MYPROGRAMFOLDER\MAIN.OBJ'. Any idea? Thanx.
@danielb39049 жыл бұрын
I get an error that says No Such file or directory, anyone knows how to fix this?
@zhahzain6 жыл бұрын
make sure you add paths to the project while creating new class
@Skulltroxx5 жыл бұрын
why did he create and completely different page for the class? Couldn't he just have made one above the main function?
@瑠ちゃん10 жыл бұрын
For some reason Code::blocks doesn't give me suggestions and I need to type everything myself?
@lennartschellen35866 жыл бұрын
The thing with creating that class and then use a function from there doesn't work on my computer although the settings of my class are the same as yours. Is this a problem caused by some new updates.
@tachomnzvs312 жыл бұрын
I'm stuck in 2:43 whenever I create my function (createCrap on the video, but i named mine different) the red error line appear under that function, it says "Error: Class 'Sally' has no member 'printCrap' " please help, I am using Visual C++ 2012.
@iamawesomelessness13 жыл бұрын
can anyone explain me why we are initialising a pointer(say p) as int *p = &a; doesnt *p mean the value of the variable itself....... so if we want to point a pointer to the address of a...we should be doing int p=&a; thank you for the help...
@ArtistofAkron12 жыл бұрын
The way the program works will not allow the use of a function unless it is introduced before hand. That's where the .h inclusion is for. Think of the .h as eharmony and the class .cpp is the actually person. they don't just go on a date without knowing who they are even meeting, they first go through a medium to introduce each other then go out for a steak. "Did someone say steak?"
@shishirmaharaj658512 жыл бұрын
hey.... How do you save when you are opening class..every-time i create class,it doesn't run and also when i try to save it and open again...i only get main.cpp and the other tabs are always missing... please help me..
@gorsama-21904 жыл бұрын
when to use it where is the video? awesome video btw thank you.
@chaostroll126713 жыл бұрын
6:07 Schooled.
@rolarola59156 жыл бұрын
just great. Thank you !!
@evanmastermind10 жыл бұрын
What is the benefit of using a pointer?
@taneix_tutoriales7 жыл бұрын
what is the diference from "(*pointer).print()" and "pointer->print()" or it is the same, but the result is opsoluted the same, but it is the same for computer ?
@sherifal-demairy527910 жыл бұрын
getting an error message .. " undefined reference to sally::printcrap any help ?
@bernardparahbarje10 жыл бұрын
make sure all the classes are in the same directory as the main file or you can simply create a project and then create the classes. A project will give you the main.cpp by default.
@unison197810 жыл бұрын
Is it faster to point to a function rather than access it through the class?
@Qazqi12 жыл бұрын
Make sure the one in your class definition is void faiths();
@RaamAnkka14 жыл бұрын
Wait which video did he cover the class files? because i skipped whole lot of them because i thought i know pretty much it
@brianlaudrupchannel9 жыл бұрын
I had to put using namespace in the other class for cout to work
@northory28469 жыл бұрын
+billyblackburn87 You could also use std::cout instead of cout and then you won't have to put using namespace in it.
@amanuel21358 жыл бұрын
+billyblackburn87 What +Northy Said is much reccomended: stackoverflow.com/questions/1452721/why-is-using-namespace-std-in-c-considered-bad-practice
@buraky168 жыл бұрын
+thenewboston god, bucky you teach very well but no offense , the way you sort the topics are like sphagetti . i came to this video from 55th tutorial and it also really took so much time to find that video cuz of naming (i was looking for 'using pointers in classes' ) . Thank you a lot for teaching anyway :)
@spacemansensei943410 жыл бұрын
If you get an error.... restart codeblocks it works :)
@Tonyrosama12 жыл бұрын
I also constantly try using right click- copy on CodeBlocks. Maybe its for the better to break the habit for good!
@waleedaz1003 жыл бұрын
Dear my brother, please can you show us how we can open a new class with visual Studio 2019 as you have done in your video. I am stuck. Please, i need your help
@shirshahsahel9176 жыл бұрын
I am facing an error that says ||=== Build: Debug in pact 2 (compiler: GNU GCC Compiler) === error: 'Sally.h' file not found| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| Any idea ??
@oscarabrahamsson582012 жыл бұрын
I love this Arrow Member Selection Operator :D
@akashpriyadarshi56126 жыл бұрын
I am not able to wrap my head around the concept of class and objects as to why we actually need them.Could anyone please help me out here?
@steve1222888 жыл бұрын
Interesting how you can declare a class within a function, and still use it if all your functions inside it are already defined. Course, when you try to define them outside the class, you get errors; c++ seems to think you're trying to call a function in a different scope or something. Strange thing I noticed.., If you create a class that uses a header file, then delete the header file and all references to it, then go and try to define class functions outside the class declaration, it gives you these "multiple definition" errors. It behaves similarly to if you were to try to define its functions when already inside a function, but seems to think perhaps that the file is for defining things only, and so when you declare something, you are also defining it.
@Bengadeer9 жыл бұрын
Code::Block 13.12 won't let me use the Sally object without defining the Constructor first. I get "undefined reference to 'etc.' " dot reference or -> reference.
@ranesagar9 жыл бұрын
+John Wolf 1. Save all your files (all the 3 files) 2. Close CodeBlocks 3. Restart the CodeBlocks application. That will solve the problem
@Bengadeer9 жыл бұрын
+Sagar Rane Thanks. I found out I have to open a new project for each of these exercises. Code::Block doesn't know where all the connected files are without them being in a project. So now I start with a project and the only issue is occasionally CodeBlock can't find some reference MS file I never heard of, but restarting the app makes all that go away and it works perfectly fine. I'm using WinXP. That might have something to do with it!
@ranesagar9 жыл бұрын
+John Wolf when you create a new class file, just un-check "add relative path" which is by default checked. By doing that, you would not need to restart code block.
@Bengadeer9 жыл бұрын
+Sagar Rane Okay, I'll look into those dialog boxes a little deeper. There are a lot of boxes to check or uncheck. I did notice when I closed out a troubled exercise, CodeBlock had a series of dialog boxes that essentially got everything straight as I closed out. I also figured out I didn't need all the extra .o files, etc., just doing these exercises. The given main.cpp file that comes up as part of a project is interesting. It has acted weird some of the time. At first I had to "save-as' to a different file name to get the .ccp file added to the project and then delete the main.cpp and other times the main.cpp didn't give me an trouble at all. I just filled it out and went about business. I got the weird MS file the app couldn't be locate as a error message when main.cpp was acting weird. It wouldn't build and run because of this error. That's probably part and parcel to setting by the dialog boxes as well. By just building up a project with each exercise, all runs smoothly.
@AnupKumar-wk8ed8 жыл бұрын
+John Wolf Thanks a lot. Your comment helped me with same problem.
@jbkfootballer12 жыл бұрын
when did you switch over to codeblocks from dev c++
@katieyeates685612 жыл бұрын
I know this is probably a stupid question, but in the header file when prototyping the function printCrap why do you need the void before it?
@leonardotornesello9307 жыл бұрын
if i understood well, you need the -> in order to use functions into classes and not the entire class, am i right?
@itsforyou72444 жыл бұрын
I can't understand the benefit of using pointers over actual objects. Will anyone help me? Bucky didn't say it either
@kuanlimputera11 жыл бұрын
This may be silly but how to type the symbol arrows member selection operator in your keyboard .. ?
@Moon_Rose달장미4 жыл бұрын
at 6:07 Bucky be like ( *in weird voice*): Some people are gonna say, Grammatically, pointers aren't even the same thing as an object
@Qazqi12 жыл бұрын
It's not enough for them to be in the same folder. They have to be in the same project in your IDE.