See, this is the easier stuff. Those last few tutorials on classes got me really tangled once you introduced constructors.
@beri41387 жыл бұрын
A constructor in a class is the same as a function in a class. The only differences are: - A constructor has the same name as the class itself. - Instead of being called, a constructor runs automatically when you declare an object of that class.
@top10detrax457 жыл бұрын
cool you just cleared out my doubts :D
@nepalihercules6 жыл бұрын
when in doubt, cout.
@dbc201theking6 жыл бұрын
Gaming Turkey Also constructors don’t return anything?
@theseangle4 жыл бұрын
@@dbc201theking they physically can't
@RunItsTheCat10 жыл бұрын
I am 500 years old and I am offended.
@DerickZ2810 жыл бұрын
Why are you still alive?
@Pinkiepyro110 жыл бұрын
stonecoldtrk probably cheats.
@ТайныйЯ-к3ь10 жыл бұрын
Constantine Leon Don't be so rude...
@Pinkiepyro110 жыл бұрын
Тайный Я It was in reference to the video.
@ТайныйЯ-к3ь10 жыл бұрын
Pinkiepyro1 I know.:D
@meganradley708410 жыл бұрын
This is perfect! I love the way you describe these so easily, it really makes sense. Thank you so much for these!
@raptor_227710 жыл бұрын
Someone is going to watch this in 2500 and be greatly offended by you saying "if you are 178 years old, you should be dead."
@marcopolo55415 жыл бұрын
Do you think C++ will still be relevant by then? Or worse, do you think humans will still be relevant by then?
@dashcampower46225 жыл бұрын
@@marcopolo5541 c++ has like infinite potential. its an extension to C and its library gets bigger and bigger like every 2 years
@KlaPzCA7 жыл бұрын
I just made something really simple with if/else statement I'm happy to see myself progressing... #include using namespace std; int main() { int x; cout x; if(x
@BradenBest8 жыл бұрын
Would've been a perfect opportunity to introduce the && operator. Also, just because you can nest if blocks, doesn't mean you should. Unnecessary nesting leads to unnecessary complexity. Use functions instead. if(someCondition) functionForThatCase([necessary values]); else someOtherFunction([etc])
@ionyjula248812 жыл бұрын
wow Bucky...you are the best teacher online. 10 of 10!!!! I did"n know nothing about programming and now...I am learning C++...with the best teacher in the world. Yours videos are AWESOME!!!!!God bless you! and many thanks!!!
@nipunfernando76887 жыл бұрын
Wow this helped alot, I was confused with these at first but not anymore. Thanks bro
@dibbiepk12 жыл бұрын
"Wow, you are old" "You are young, geta job" What a nice and friendly program, HOW MUCH!? :P
@Blank-fe6wi2 жыл бұрын
Most of the times it's those technical terms that confuse and scare the sh*t out of you. Thanks for making such a each to understand tutorial.
I am doing exactly this. Helps allow me to remember stuff from previous tutorials while integrating them in the newer ones. Usually I forget everything I learn soon after so now I have created a personalised forum. Writing everything down with my own examples and at the end make example programs which integrate everything I have learned.
@dizzykitten924310 жыл бұрын
awesome, I dont know if he went over this because I stopped and wanted to try a few codes and with the prior knowledge I made them enter their age and if it was younger than 15yrs old it would say "Hey there young son" if it was older it would say "hey there elderly" PROUD OF MYSELF :D IM LOVING C++
@dustbinsavesyou82837 жыл бұрын
lol, I had python knowledge from the start so I wrote that in just 1hr learning c++
@nemesi88006 жыл бұрын
Yeah same :D Knowing any programming language, even with easy syntax like Python helps a lot. Otherwise I'd be struggling and be like... "wut.. why do I need this?" "What is this????" HEEEEEELP? lol
@newkid98076 жыл бұрын
Nemesi rip
@ai.2015 жыл бұрын
Learn more from this then 1:20 hour slot at my stupid university.
@Qazqi11 жыл бұрын
You can do if (std::getline(...)) to check whether it succeeded or if (std::getline(..., line) && line == "wanted line") to check if it succeeded and is the proper line.
@TheYousif512 жыл бұрын
create an int call it "age", put "cin
@justinzheng30002 жыл бұрын
C++ is kinda insane
@StoneSlayer11 жыл бұрын
Wow this is the first video with 100% like rate that i have seen!! Keep it up Bucky!!
@MrAssassin149211 жыл бұрын
first video i have ever seen without dislikes.
@gm3avxdd7 жыл бұрын
Technically there is a maximum nesting depth of 256 (including the function).
@simon-yi6jv3 жыл бұрын
2:30 { cout
@church77812 жыл бұрын
Yes, it will. The program works top to bottom, so if there is a line before the nested if statement, it will run it since the first if statement was true.
@veer44195 жыл бұрын
"If you are over 100, why are you still alive?" - That is cold. I hope you know that now scientists are saying that people will easily live to 150, 200 years old in the not-so-distant future.
@PuckishAngeI3 жыл бұрын
me: *fucks up the code* age 3: "Why are you still alive?"
@Civik_123_2 жыл бұрын
Bro I'm 10 and I understand. You teach so good! Thank you
@Faraz902312 жыл бұрын
Wrong, first of all, its cin >> age, and not cin
@ThatGuyNamedBender11 жыл бұрын
Not trying to brag but knowing some languages before learning C++ this was fairly simple for me ^^ For the people who are like me here is a good challange. Make a class that handles the age calculations. So that your main.cpp file would basically look like this. int main(){ { ourClass.requestAge(); return 0; } or something like that xD
@coreydoyle470211 жыл бұрын
Theoretically, you can have an infinite number of if's inside of if's. -Cheers
@Robber712 жыл бұрын
The marked text in the tumbnail for this video looks like a sniper rifle!
@mr.ANIMAT0N2 жыл бұрын
I am 106 and you have destroyed my dreams in learning programming. Just kidding 😛
@johnlarios873 жыл бұрын
hey man my earth is older than 187 years old
@MontSteve3610 жыл бұрын
Thanks Bucky, I am 78!!!
@TheCosmicChicken12 жыл бұрын
As soon as Bucky suggested testing if they're over 100, I was like "I would output 'How are you still alive?'". Then Bucky's like "And then we're gonna write...cout...um...why are you still alive?" And I was like ":O"!
@kaleab15 Жыл бұрын
Re-record over that, otherwise great content. Thanks
@TheCosmicChicken Жыл бұрын
People do live to be over 100 sometimes. Perhaps a better output would be: "Congratulations on such a long life!"
@ninjasensei98349 жыл бұрын
2:45, turn on captions, LYAO.
@stick45084 жыл бұрын
Lmao.
@dayeemouwon10 жыл бұрын
I need help on my c++ program and the question is has follow: A box of cookies can hold 24 cookies, and a container can hold 75 boxes of cookies. Write a program that prompts the user to enter the total number of cookies, the number of cookies in the box, and the number of cookie boxes in a container. The program then outputs the number of containers to ship the cookies. Note that each box must contain the specified number of cookies, and each container must contain the specified number of boxes. if the last box of cookies contains less than the number of specified cookies, you can discard it and output the number of leftover cookies. similarly, if the last container contains less than the number of specified boxes, you can discard it and output the number of leftover boxes..
@farristurner64434 жыл бұрын
Thank you! I'm learning from a 2003 textbook and it did not have the brackets...that's what was causing my code not to work
@frangallagher894111 жыл бұрын
That is actually a brilliant idea! Nice thinking
@adkadatka2449 жыл бұрын
#include using namespace std; int main() { string a; int b; cout > a; cout > b; if (b
@Brainimplodes9 жыл бұрын
Nice but could use some tidying up like aligning both "cout"s in the if/else statement for easier readability. Also like in Bucky's video, I'm personally like the look of my first curly bracket being in the same line as my "if/else" instead of going to a new line.
@xXLanyuzAnlunXx9 жыл бұрын
+adka datka use void int main { }
@xXLanyuzAnlunXx9 жыл бұрын
ikr :D
@adkadatka2448 жыл бұрын
***** I wrote it on code::blocks #getRekt
@habbo1597 жыл бұрын
lmao
@yoferenuntar64819 жыл бұрын
do we have elif in the c++??? or we can just type if below the if???
@Halvard199210 жыл бұрын
I happen to be 178 and I find this offensive! >:3
@StickMan13169 жыл бұрын
Here is what I came up with on my own after your if and else statement #include using namespace std; int main () { int x,y,z; cout > x; cout > y; cout
@MrPikmin38 жыл бұрын
+StickMan1316 i came up with this after watching this video #include using namespace std; int main() { start: int add = 1; int subtract = 2; int multiply = 3; int divide = 4; int a; int b; int answer1; int sum; cout > answer1; if(answer1==add){ goto addition; } if(answer1==2){ goto subtraction; } if(answer1==3) { goto multiplication; } if(answer1==4) { goto division; } if(answer1 > 4) { goto error; } if(answer1 < 1) { goto error; } addition: cout > a; cout > b; sum = a + b; cout
@StickMan13168 жыл бұрын
+Lukas Pratt Thats good. later in the c++ tutorials ur gonna learn about the switch statement... you are going to love!!!!!
@MrPikmin38 жыл бұрын
sure will, thanks
@sammy55764 жыл бұрын
love your channel thanks you awsome teacher
@allankamoga54777 жыл бұрын
well understood..... the simplest tutorial
@rohanpandey99574 жыл бұрын
i have a question how to apply all these knowldege and i mean by that is how can we solve problem related to what he teaches us as if we dont do problems at that instant it will become of no use in future so pls guide me through it.
@P3nk013 жыл бұрын
umm what kind of compiler are u using bucky ps i love your videos keep them coming ;];]
@TehOnlyShoe12 жыл бұрын
Lots of different languages use the "if" statement. It's a common thing. But apart from that, yeah they are pretty dang similar lol.
@RAFMnBgaming8 жыл бұрын
somewhere yoda is looking at this and thinking "bitch please".
@jeppemolin420696 жыл бұрын
how would i use the if statement but for currency i want to attempt to use it as an if Kr is more zero or less euro is x times that ?
@givup_11 жыл бұрын
i know that this is pretty late but it doesn't print the else statement becouse there is no else statement for that if statement. That else statement is for the if(age > 100). Sorry for the bad english and hope i helped even a little.
@dylangriffiths746411 жыл бұрын
Can you use the getline function with an if statement to verify if the users input is correct or not?
@yimjabo110 жыл бұрын
I don't know why but, for some reason, even though I have the same exact thing typed up as him I keep getting "warning: statement has no effect [-Wunused-value]". Can anyone help with that?
@abhishekjaiswal31217 жыл бұрын
thanx, buckys u give lot information about c++ , but i don't understand what constructor is ?
@shehuadesanya199010 жыл бұрын
You should be arranging your work well Great work btw
@spinningninja28 жыл бұрын
#include using namespace std; int main() { int age; cin >> age; if (age >60){ cout
@playertwo45583 жыл бұрын
My esle statement looks exatcly the same, but no matter what I try it gives me only the if statements answer
@mrsmileycorps11 жыл бұрын
what i am doing is making a text based game and slowly improving it with the concepts i learn from bucky. Although im pretty sure you already know c++ by now XD
@pedro_navarro10 жыл бұрын
I hope our next generations don't ask some people the same question.
@Mista_Moon_Goon12 жыл бұрын
Ok, I have a weird question. If I have a general loop and placed an if...else inside that loop, would that if statement be considered nested, or is an if statement only considered nested when it is within the scope of an outer if condition?
@Benzzzy.4 жыл бұрын
I really love his voice
@SinisterShrink11 жыл бұрын
Well he did say, "Let's go DEEPER...." So I think he was subliminally referencing to Inception. Nobody will ever know.....
@limyonghun0812978 жыл бұрын
i have a qns, if i put if else statement under if else statement is it possible? e.g if ( year ==1 ) { if (category == 1) { printf("ur great") } else if(category == 2) { printf("ur cool") } } else if ....... need help ASAP thanks
@Tylernal8 жыл бұрын
;
@chronixthegod8 жыл бұрын
This is C, not C++...
@KeyurKumbhare8 жыл бұрын
keyurk42.blogspot.in Find the notes of Bucky's C++ programming tutorials over here. Do share the message so that everyone can get the benefit.
@Himanshukumar-ow3fx5 жыл бұрын
bro i want answer of 1 question blowing my mind i spend 2 days on this still not done soccer club registring boys and girls for their camp,club represent player with there group as follow age =4 to 7. micro group 8 to 11 . junior group 12 to 15 . juvenile group 16 to 18 . senior group program to calculate 1.show in which category player will be. 2.how many players in each category. can you help me out bro
@TheaDragonSpirit12 жыл бұрын
Has anyone else noticed that a small case "L" looks just like "1" or a One in this program. Sometimes I copy what he has put and my brain instinctively goes to the 1 key and not L. How odd.
@marianadeltoro825911 жыл бұрын
hey newboston! how are? thank for your video. I am a college student and actually I'm in a class of C++ programing.. so, I have to make this lab assigment which is killing meeee. Is about turning arabic numbers to roman numbers... so I was thinking if I can use the if else stamente for make the program... cause the professor want that the program accept numbers of years of 4 digits... =/
@bakat24545 жыл бұрын
29 people disliked because they’re over 178 years old and they’re offended
@Sufi393 жыл бұрын
10 year anniversary?
@brandlax12 жыл бұрын
Bucky should give us 'homeworks' so that we can practice it better! :D
@bilalarain46329 жыл бұрын
I Love It
@Parkseo2267 жыл бұрын
hey why we are not using cin here? when we exactly use cin?
@theminecraftsorcerer30618 жыл бұрын
the only thing i hate about learning from videos is that i can't directly ask you why my program isn't working and show you my screen.
@newkid98076 жыл бұрын
The Minecraft Sorcerer ok minecraft sorcerer
@jasimali90313 жыл бұрын
Can you please give ma a link of 18th lecture?
@mohamedalsudani56939 жыл бұрын
#include using namespace std; int main() { int x; cout x; if (x > 21) { cout
@TheaDragonSpirit12 жыл бұрын
I prefer 'if', then 'else if'... and 'else' as a safety net encase something went wrong and you really don't know why or what could have happened. For example, I type a letter and not a number. :P
@crimsonking38736 жыл бұрын
can someone tell me why it says the the else If will never be executed //OPTIONS if (options == "Ranged" || "ranged") {cout > ranged;} else if (options == "Melee" || "melee") {cout
@crimsonking38736 жыл бұрын
Oh......
@crimsonking38736 жыл бұрын
Actually I was going to look up what you said since Im still new to programming and have memory loss so I have to take a lot of notes. Thanks for saving me time telling me.
@zombieat8 жыл бұрын
do you really need the extra curly brackets before and after else?
@siaogaboh8 жыл бұрын
+mohammed6649 not necessarily, but a good practice, for readability of code.
@Seikuu12 жыл бұрын
Is that really a problem? The way I see it, the if statements, loops, classes, functions are all just puzzle pieces, the key is how you put them together. honestly the teachers and other guides all listed the other variable kinds, but they all use int in the end for the following lessons and sometimes char, so i don't really remember most and don't know when to use the others anyway and you don't really need them now. So why not skip them until you need them and you can actually remember them?
@krishsabori68037 жыл бұрын
How we can make if else statements to show vowel and consonant letters
@krishsabori68037 жыл бұрын
How can solve my problem please send me my answer
@SinisterShrink11 жыл бұрын
Question: Would nesting an if inside of an else be the same as an "else if" in Java coding?
@1...........123-t9b4 жыл бұрын
No
@animfix28407 жыл бұрын
Buckys spelling> my spelling
@Subakak7 жыл бұрын
You could type in a cin command
@thefridge92786 жыл бұрын
why is this in a bad meets evil playlist??
@TheSplendidSpiders12 жыл бұрын
I wish I could get a raise from an if statement.
@Xaeroxe11 жыл бұрын
You must be new to this :P A basic windows program has a WndProc that runs a switch statement that runs several layers of if statements, and is connected to functions outside of the WndProc. Shit gets complicated real fast :P
@NikorasuChan8 жыл бұрын
TRIGGERED!!!!!!
@karlenzejohn76589 жыл бұрын
what if you want say like wow you're old and only say this if the person is 60 to 100 and if they say they are 100+ you only want the message why are you still alive to pop up?
@Ace-gw4uk9 жыл бұрын
if person is more than 99 print you still alive ? else if person is more than 59 print you are old
@REALCOOLLIKEVIPUL12 жыл бұрын
Why KZbin gives me error when i try to paste code? How do you guys do it?
@Heds1239 жыл бұрын
is there a problem with this line of code? #include using namespace std; int main() { int a; int b; cout a; cout b; if (a < b) { cout
@Heds1239 жыл бұрын
Heds123 disregard this comment I've fixed the problem
@waliedahmed14099 жыл бұрын
Heds123 I cant find the problem xD seems good to me
@Heds1239 жыл бұрын
Walied Ahmed don't worry about it, i think the problem was that i accidentally had a header file running as well and it was interfering with this program
@michaelkixes906411 жыл бұрын
I am getting this error when I do this code Error 1 error LNK2019: unresolved external symbol "public: __thiscall Burrito::Burrito(void)" (??0Burrito@@QAE@XZ) referenced in function _main C:\Users\Mike\Documents\Visual Studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj ConsoleApplication2 Error 2 error LNK1120: 1 unresolved externals C:\Users\Mike\Documents\Visual Studio 2013\Projects\ConsoleApplication2\Debug\ConsoleApplication2.exe ConsoleApplication2
@porsa011 жыл бұрын
Dont use _ in naming.
@bartkwezelstaart930611 жыл бұрын
Are you sure youre classes are corectly defined and included?
@michaelkixes906411 жыл бұрын
Bart Kwezelstaart I think so, but I am using Visual Studios so I did a little bit of shifting of files to make it work so idk.
@bartkwezelstaart930611 жыл бұрын
Michael Kixes If your still intrested in the solution of this bug, i will be glad to find out where it slips in your code because im running VS myself and im wondered why it doesnt work.
@archavez10011 жыл бұрын
KZbin won't let me post it. I'll PM you.
@ahmadh39154 жыл бұрын
I did not understand when to put brakets
@gaminggoddessaria4 жыл бұрын
no matter what I do my else statement runs
@RuberSocks12 жыл бұрын
now your getting it
@shadidhaque751811 жыл бұрын
i was trying to combine switch and if together but getting errors...help.plz..
@PS2Damon9 жыл бұрын
4:40 thats some funny ass shit
@dibbiepk12 жыл бұрын
IF AND ELSE! WHOO! (I already know all about this, still) I wonder what the next one is =D
@josephscinto93584 жыл бұрын
I love your sarcasm
@glaivetitan9 жыл бұрын
the 6 people who disliked were over 178 years old.
@meganathansubramani207012 жыл бұрын
Is there any way to print one cout statement 10 times?
@xahahyoumissedme96259 жыл бұрын
Can you use if(test) {code;}else{ If (test) }
@7873109 жыл бұрын
I think what you are talking about is the "else if" statement, try looking that up I'm not good at explaining things, its sort of like another if statement