Buckys C++ Programming Tutorials - 8 - if Statement

  Рет қаралды 750,943

thenewboston

thenewboston

Күн бұрын

Пікірлер: 519
@spinningninja2
@spinningninja2 8 жыл бұрын
I learned java before C++ and if statements are my favorite part. Literally everything changes when they are introduced. You go from barely doing simple arithmetic to being able to make a freaking text story/ puzzle!
@ermanvardar6115
@ermanvardar6115 6 жыл бұрын
same here
@itsoshe
@itsoshe 9 жыл бұрын
BUCKY IS AWESOME,i am writing my exams on C++ and these friday my man and i did not understand most of this things,Till Bucky came into the picture,my man you are Super Awesome.
@Detu
@Detu 8 жыл бұрын
pretty cool huh
@parisite613
@parisite613 8 жыл бұрын
CrazyRussianHacker huh
@theanimetruth4287
@theanimetruth4287 8 жыл бұрын
+Parisite lol yeah
@ekkeekkeekkeekkeptangzoobo5760
@ekkeekkeekkeekkeptangzoobo5760 8 жыл бұрын
wai savtee is numba waan prioty
@ekkeekkeekkeekkeptangzoobo5760
@ekkeekkeekkeekkeptangzoobo5760 8 жыл бұрын
toda weee ar goin to poooooot licid niteojin in pharo flud
@ekkeekkeekkeekkeptangzoobo5760
@ekkeekkeekkeekkeptangzoobo5760 8 жыл бұрын
toda we ar goin to tes faiv liter gajet
@mjgayle52
@mjgayle52 8 жыл бұрын
Bucky - retired professional programmer picking up C++ for fun - love your tutorials - keep up the good work!
@janandanyoganadan616
@janandanyoganadan616 4 жыл бұрын
Bucky is awsome...im starting to learn programing in 2020.Even after 9 years later still Bucky is awesome ;-)
@chanwookim8263
@chanwookim8263 11 жыл бұрын
i love every single videos you make! Thanks Buckey
@zeustheboerboel3794
@zeustheboerboel3794 8 жыл бұрын
I am in love with your videos man! I was so frustrated with c++ because of the errors that it kept on giving me. Now that I understand the language much better, errors are almost evanescing.
@ashrafanwar1144
@ashrafanwar1144 6 жыл бұрын
the more u dive into this tutorial , the more interesting its gonna be , i would say Bucky Roberts u are awesome...
@lucasagua77
@lucasagua77 9 жыл бұрын
(im argentinian) no spanish speaker knows how to explain c++ in youtube, (in fact they all explain C saying its c++) soooooo glad i gave english tutorials a try, thank you
@ryanlundrigan7529
@ryanlundrigan7529 10 жыл бұрын
I love programming and find it even fun because of you. I am a very very very young programmer and literally if I want to learn a new language I search *language* thenewboston tutorial. :) Thank you
@AltaRepublic
@AltaRepublic 12 жыл бұрын
Dude you're awesome! Thank you! I'm halfway through my C++ class and you explain things 100 times better than my prof. I'm struggling through the class at this point. I'm definitely going through you're whole playlist. Thank you again!
@larsenmb
@larsenmb 12 жыл бұрын
I love how u say "Pretty cool huh?" :D
@MGJ182
@MGJ182 6 жыл бұрын
I added all the operations to the calculator from the earlier lesson using this
@namelast-name616
@namelast-name616 7 жыл бұрын
little cheat for people. you don't have to write int everytime,for ex. : int a; int b; int c; ... sometimes you can just write : int a,b,c,...;
@mubeenirfan5971
@mubeenirfan5971 6 жыл бұрын
This makes things easier and precise😊👍
@LAWLIET_L_W
@LAWLIET_L_W 2 жыл бұрын
@@mubeenirfan5971 i had this doubt thanks for clearing!!
@Moon_Rose달장미
@Moon_Rose달장미 4 жыл бұрын
love his sense of humor, like: easy box in the last video or so
@WoodyEliteUK
@WoodyEliteUK 12 жыл бұрын
This is actually a lot easier to understand than I was told it would be .. awsome
@Colstonewall
@Colstonewall 13 жыл бұрын
I think the secret to Bucky's success with these videos, is his personality. He has a great personality for teaching. . .And I agree with others here, I love these vids too.
@nebilgokdemir4527
@nebilgokdemir4527 8 жыл бұрын
I studied your java and now c++ All I can say you are really awesome:) Thanks
@mahgoubabbas1953
@mahgoubabbas1953 8 жыл бұрын
Same
@dibbiepk
@dibbiepk 13 жыл бұрын
By the way (for those who dont know this) So far Bucky has been useing "a" and "b", those are just 1 letter, you can have more, like instead of "a" u can have "yo" or "supercalafragleistic espeala douchis" if you like. Just thought id point that out. =D
@tony60191
@tony60191 12 жыл бұрын
This C++ tutorials videos are really awesome. I really wanna thank to you Sir who made these all videos.
@ScarWars7
@ScarWars7 12 жыл бұрын
I ♥ ur vids. I've been reading C++ books too, but your vids really help to clarify everything. Thx. You Rock! ! !
@SeeThatitsYou
@SeeThatitsYou 13 жыл бұрын
I actually build this "IF" function with its body to the previous calculator even before you said it. Must mean I'm on a great way! Thank you for your AWESOME TUTS. Bucky is AWESOME!!!
@TakingItCasual
@TakingItCasual 13 жыл бұрын
Aw man, these are keeping me up late; they're so addictive. I better grab some zzzs and continue tomorrow.
@LordOfGilneas
@LordOfGilneas 12 жыл бұрын
THANK YOU! This problem has been bugging me for WEEKS. Thank you very much good sir!
@vinitraut1425
@vinitraut1425 6 жыл бұрын
4:05 It won't give an error. The "=" simply assigns the value that evaluates to true. Hence, if block would be executed.
@sahouna1
@sahouna1 10 жыл бұрын
When he said "3 is actually equal to 3" I was like you don't say !!
@CoolM-e5k
@CoolM-e5k 11 жыл бұрын
if bucky awesome cout
@FlatlandsSurvivor
@FlatlandsSurvivor 4 жыл бұрын
Pretty cooool huh? Process returned 0 (0x0) execution time : 0.253 s Press any key to continue.
@christophercloud5644
@christophercloud5644 8 жыл бұрын
thank u som mutch for making this video!!! u learnd me some thing that i have wondered about so mutch!
@JPxKillz
@JPxKillz 10 жыл бұрын
Killing the fuck out of this x2 speed. Coming from java its a lot of easy concepts.
@ruinoite
@ruinoite 10 жыл бұрын
I'm coming from VB.NET and I'm also finding this easy to get used to. It's just a new syntax.
@daredevilpwn
@daredevilpwn 10 жыл бұрын
***** I came from javascript and your right its just a new syntax. When someone told me that if you get the hang of one language, you basically know them all was right on.
@morxh8386
@morxh8386 10 жыл бұрын
lol me to. im lovin c++ coming directly from java xD
@AdAstraLabs
@AdAstraLabs 10 жыл бұрын
I came from Python and I'm just smashing these C++ Tutorials.
@AdAstraLabs
@AdAstraLabs 10 жыл бұрын
GillexStudios You fucking moron Java and Javascript are two different things. #WebdesignvsSoftwareEngineering
@youngGenzombie
@youngGenzombie 11 жыл бұрын
string a = "Text"; cout
@Qazqi
@Qazqi 11 жыл бұрын
I don't know exactly what you're referring to, but if I'm right, it depends on the literal. Something like 123 is an int, whereas 1.2f would be float and 1.2 would be double.
@lawviktor7610
@lawviktor7610 11 жыл бұрын
See the result of that if statement? Bucky is awesome~!
@TheDiamondGames
@TheDiamondGames 11 жыл бұрын
+ "!!!"
@bloodsong42
@bloodsong42 11 жыл бұрын
By learning the basics, like these tutorials, then adding on things like OpenGL, SDL, Allegro, and lots and lots of time and logic on top of all of it. All in all, a lot more difficult sounding than it really is. Just take it one step at a time, have patience, and don't ever think you know everything.
@Qazqi
@Qazqi 12 жыл бұрын
You most likely used one equals sign in your if condition instead of two. One assigns a value, while two checks for equality. The compiler's simply warning you about that. As it suggests, if you meant for the assignment to be there, put the var = value in extra parentheses, which is a common way of disabling that warning when you mean to do it: if ((var = value))
@samirgunic
@samirgunic 9 жыл бұрын
2:00 "Bucky is awesome on the screen!" True! In fact, Bucky is awesome on and off the screen! ;-)
@coreydoyle4702
@coreydoyle4702 11 жыл бұрын
bool = true/false int = numbers up to 2 billion char = 256 character values string = text string float = decimal numbers double = decimal numbers (2x more accurate than float) long long = numbers up to 9 Quintilian -Cheers
@tadejj1999
@tadejj1999 9 жыл бұрын
iam just glad i found you channel
@JujubeO5
@JujubeO5 9 жыл бұрын
I love your videos, thank you for making them!! :)
@JujubeO5
@JujubeO5 9 жыл бұрын
+R0x :D
@wafflez9888
@wafflez9888 8 жыл бұрын
+Julia Chihata We all do ;w; He's awesome
@square6082
@square6082 11 жыл бұрын
You could use it in many situations in a game: int health=0; if(health < 1){ cout
@pujaraj2669
@pujaraj2669 7 жыл бұрын
Bucky truly is AWESOME!!!! thanks a lot for this tutorial.
@siddhantsharma1870
@siddhantsharma1870 8 жыл бұрын
this is really cool! play it at 1.5X and you will still be able to comprehend! thanks bucky XD
@tazlex15
@tazlex15 9 жыл бұрын
There are two kinds of people: if(condition == true) { cout
@andrewlee2771
@andrewlee2771 9 жыл бұрын
***** i dont either though :/ it feels easier to read that way for me lol
@malteeaser101
@malteeaser101 9 жыл бұрын
***** I sometimes do one and sometimes do the other. I don't know which is officially best practice.
@andrewlee2771
@andrewlee2771 9 жыл бұрын
it's all personal preference. people wont bash you for your backswing in golf, same thing with your coding preferences
@malteeaser101
@malteeaser101 9 жыл бұрын
Andrew Lee I lose marks, though lol. My lecturer cares.
@malteeaser101
@malteeaser101 9 жыл бұрын
Andrew Lee We get marks for following specific practices. We have to name everything correctly, too. But I also have a bit of an OCD and like it to look as nice as possible :P it has to be consistent and if there is one tab out of place then I feel sad.
@cassiomarques893
@cassiomarques893 7 жыл бұрын
Thanks Bucky, very enjoiable and clear teaching :)
@SnugLife
@SnugLife 8 жыл бұрын
Just finished lesson 8.
@SinisterShrink
@SinisterShrink 12 жыл бұрын
Learning programming languages is similar to learning new speaking languages in general like French or Spanish. And like learning a new speaking language, the more languages you know, the easier it gets to learn new ones. For example I have coded in HTML, Java, Javascript, and Ruby and each time gets easier to learn more.
@adamlion39
@adamlion39 10 жыл бұрын
Dude, You said " Bucky is AWESOME!!! " a million times
@Fbiman93
@Fbiman93 14 жыл бұрын
Bucky you are so good at making thing that could be so complex amazingly simple. You rock! :D
@borhanamini
@borhanamini 9 жыл бұрын
Bucky is very very awsome. thank you Bucky for sharing.
@Zepherhz
@Zepherhz 13 жыл бұрын
i made a calculator after watching this video your awesome bucky keep up the good work
@lewisb8634
@lewisb8634 10 жыл бұрын
Amazing explanations Bucky, subscribed!
@GivenFailure
@GivenFailure 12 жыл бұрын
Only the first your is correct. Your is possessive, if the original comment had said ",your c++ tutorials are fun" then it would be correct, but he said ",your making c++..." and even if Bucky owns the word or action making there is no other verb in the second part of the sentence.
@Qazqi
@Qazqi 11 жыл бұрын
int doesn't have to be up to 2 billion. int is only required to be 16 bits, and can be that or anything higher. Chances are, it's 32. long long is the same, but at least 64 bits. char can be signed or unsigned, so trying to assign 128 to char might not print what you expect. I believe float and double could technically be the same in some odd environment.
@blackzack61g
@blackzack61g 12 жыл бұрын
your the most amazing person for making this playlist. Thanks Bucky!
@Boomerlance
@Boomerlance 13 жыл бұрын
thanks to bucky,i know java and now im on my first steps on C++ i would shake his hand if i were to meet him personally,the world would be better if people would be like him... NO HOMO OR OTHER SHIT,JUST BEING REALISTIC....
@X525yes
@X525yes 11 жыл бұрын
basic knowledge of lua makes this a lot easier to understand
@danger2bad1
@danger2bad1 12 жыл бұрын
AWSOME STUFF.....I look forward in comming home to learn this from You!!
@DutchTDK
@DutchTDK 12 жыл бұрын
To give all of you some motivation. With the knowledge you've learned after this tutorial, you can already make a small text based story with choises.
@andreeea190
@andreeea190 2 жыл бұрын
waw. this enlightened me
@DutchTDK
@DutchTDK 2 жыл бұрын
@@andreeea190 10 years ago I made that comment. Choices*
@Xykron13
@Xykron13 11 жыл бұрын
Instead of if(test) I would've done if(condition). Just because it make a little more sense. Still love the vids though! :D
@cleodontina1
@cleodontina1 11 жыл бұрын
Bucky you are awesome indeed! Thanks for making C++ so simple!
@2CloseShave
@2CloseShave 11 жыл бұрын
Setting dimensions: Width = 1600 Height = 900 Timing events: Time = Time + 1, if(Time == 30){Explode = 1} etcetc
@laukam79
@laukam79 8 жыл бұрын
Bucky is really AWESOME!! :)
@MarijnKonings
@MarijnKonings 11 жыл бұрын
Avast pops up for me as well, just add an exception for the folder your codeblocks project is in or something along those line. Just make sure you use this folder only for what you write yourself, and you know is safe. In the end don't worry about it, it's normal AV behaviour ^^
@imcyanW
@imcyanW 11 жыл бұрын
remember that all of he nr# (int double long float) also go in the other direction not just the one so int could be -2 bilion and float -234 just Fyi :)
@ianiket0013
@ianiket0013 9 жыл бұрын
Thanx Bucky for sharing the useful stuff..........................
@sweetxtoota
@sweetxtoota 8 жыл бұрын
YOU ARE A LIFE SAVER!!! THANK YOU GOD!!!
@anirudhtv
@anirudhtv 4 жыл бұрын
this video is PRETTY COOL HUH
@SPARTAgoneROCK
@SPARTAgoneROCK 12 жыл бұрын
if you don't care about programing and just come here to hear bucky talk thumb up
@AnkitJainCreations
@AnkitJainCreations 11 жыл бұрын
Hi, Thank you very much for sharing the knowledge. Can you please tell me, how this works, unlike the convention, we have not declared the names and values of the variables. Is t true that C++ will consider a number as an integer or float whichever applicable, if we do not declare the “type”, name and also the value of the variable.
@AbdulWahab-ev2ct
@AbdulWahab-ev2ct 9 жыл бұрын
your tutorials are beyond brilliant I want to ask that if we dont put the curly braces after if statement and simply if (5>3) cout
@thavrisco1632
@thavrisco1632 9 жыл бұрын
+Abdul Wahab Oh, yeah! That's true. I guess there are two ways of handling an if statement. I even tried it with two and it worked.
@Qazqi
@Qazqi 11 жыл бұрын
Java most certainly did not come before C++. C++ was standardized in 1998, but it was around for a long time before that.
@cooper3795
@cooper3795 5 жыл бұрын
Aren't equal to (==) and not equal to (!=) also relational operators ?
@aikslf
@aikslf 11 жыл бұрын
the if statement is also used in batch files. You should do batch tutorials
@juanortega1990
@juanortega1990 8 жыл бұрын
Awesome content, but can you give me a real scenario as to when ir in what setting I would have to use this function in a real program?
@adeolareid1536
@adeolareid1536 8 жыл бұрын
Hi was wondering if anyone could help me. The screen that pops up when you run the code doesn't stay up in mine after I input the variables. i know i suppose to remain to output a message to the user but it instantly closes.
@nidhinair6086
@nidhinair6086 11 жыл бұрын
ur just awesome bucky!!!!! this video really helped me a lot...
@MattBee2k2
@MattBee2k2 13 жыл бұрын
@ShagenHD yeh that does make a lot of sense, I need a few examples which help me understand things better, like I remember the code but I just wouldn't know when and how to actually use it in a program.
@syedhasan7828
@syedhasan7828 9 жыл бұрын
idk why my if statement is not working. I'm using cpp.sh as my compiler. Kindly let me know! it's giving me an error which says " In function 'int main()': 8:12: error: 'If' was not declared in this scope" #include using namespace std; int main() { If( 1
@whattheheck6482
@whattheheck6482 9 жыл бұрын
+syed hasan there are supposed to be if & else not just if
@lefan-tan
@lefan-tan 10 жыл бұрын
im from python, and i can't believe that c++ is that easy. Glad i started from python , phew
@ujjwalasetty1288
@ujjwalasetty1288 6 жыл бұрын
Your first language will always seem harder than the second/or the many you will learn after.
@IrakLobsta
@IrakLobsta 7 жыл бұрын
i understand that it can be used for >> what if if i was supposed to write this int a; int b; int miracle; if (a = miracle) will the program recognize a word?
@rayzecor
@rayzecor 9 жыл бұрын
So cool!Using your lessons I built I really small math exercise.I used the if statement and cin a lot.I wanted to ask the person doing the exercise if he wants to do it but I dont know how to make an if statement to run if the guy says yes so i asked him to write down a number bigger than 5.Can you help me?
@bacano881
@bacano881 9 жыл бұрын
I have a problem +thenewboston every time I try to build and run a new program I think it doesn´t overwrite the previous one and it only pops up a window but nothing appears just the window with everything black and the cursor, how do I fix this?
@firstpersongamers6375
@firstpersongamers6375 9 жыл бұрын
what about an else statement. It is another important thing in and if else statement so depending on what the user does it does one or the other ex. int main(){ int a = 93; int b = 2 * 93; if(a > b){ cout
@Tabby412
@Tabby412 9 жыл бұрын
+firstpersongamers else is explained later, though I understand what you're saying
@amansharma-gg2wk
@amansharma-gg2wk 10 жыл бұрын
really awesome. Mr BUCKY.
@OliverJakeBajas
@OliverJakeBajas 12 жыл бұрын
that line "pretty cool huh" was funny.. HAHAHAHAHA.. XD Thanks bucky for the tutorials and its really helpful to me.
@Niffie
@Niffie 6 жыл бұрын
Hi, how do you make an if statement that states "Less than 10 but no less than 5" edit: Ok, I just put in (sum 5)
@chrispas761
@chrispas761 8 жыл бұрын
guys i m a newbie and i m trying to make multiple if statements but it does not work and instead only prints out the first if statement, any suggestions?
@hmh530
@hmh530 11 жыл бұрын
I've found that a lot of object-oriented languages are similar. Python, Java, JS, C++ ... if you get the concept of one, you just need to learn a new syntax for each language.
@mehedi416
@mehedi416 6 жыл бұрын
Bucky really is awesome
@ashutoshtiwari3785
@ashutoshtiwari3785 6 жыл бұрын
How are you building and running so quick?
@pawandandotiya5798
@pawandandotiya5798 6 жыл бұрын
how you run the code, how you remove * before main in heading
@ismaileddoughri4636
@ismaileddoughri4636 3 жыл бұрын
fun fact he made the 7 or "greater" episode in one day
@sagarkaushik
@sagarkaushik 11 жыл бұрын
Thanks Man. This tutorial Sure helped me a lot. Cheers!
@parodysauceofficialytps7484
@parodysauceofficialytps7484 5 жыл бұрын
Is there any difference between >= and =>?
@crayz1978
@crayz1978 12 жыл бұрын
I was about to add to the "else if" lol nice one
@anshulss
@anshulss 9 жыл бұрын
Using " ; " (semi colon ) after if command removes the its effect why ?
@amitamanna8474
@amitamanna8474 12 жыл бұрын
Condition True... I totally Totally agree " Bucky is awesome !!!!"
@SeRbianPlayingGames
@SeRbianPlayingGames 10 жыл бұрын
i am learning pascal in my school, and i wanted to learn c++ by myself. i noticed that in pascal there is IF (SOMETHING) THEN (DO SOMETHING) but there is also an ELSE branch, does that exist here?
@SeRbianPlayingGames
@SeRbianPlayingGames 10 жыл бұрын
thanks, I was lazy to see that bucky has a tutorial on that as well :)
@SeRbianPlayingGames
@SeRbianPlayingGames 10 жыл бұрын
that is why i am watching these :D
@freematrix6368
@freematrix6368 10 жыл бұрын
Almost all programming languages has it.
@tomdog132
@tomdog132 11 жыл бұрын
so im just wondering how would people use this to make a video game? btw u are a great teacher thx
@stormonthebeat2562
@stormonthebeat2562 2 жыл бұрын
thanks for this knowledge really important
@SolidSnake1104
@SolidSnake1104 12 жыл бұрын
Im learning c++ to make a simple text game thing lol. Great vids bucky!! :D
Buckys C++ Programming Tutorials - 9 - Functions
9:04
thenewboston
Рет қаралды 1,2 МЛН
Learn C++ With Me #8 - If, Else & Else If
17:05
Tech With Tim
Рет қаралды 39 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
why do void* pointers even exist?
8:17
Low Level
Рет қаралды 405 М.
Buckys C++ Programming Tutorials - 31 - Recursion
8:19
thenewboston
Рет қаралды 551 М.
C++ Programming Tutorial 33 - If Statement Practice
6:03
Caleb Curry
Рет қаралды 63 М.
How I program C
2:11:32
Eskil Steenberg
Рет қаралды 801 М.
Buckys C++ Programming Tutorials - 19 - Simple Program Using a Loop
7:44
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 858 М.
How to REALLY learn C++
8:13
The Cherno
Рет қаралды 817 М.
C++ switch tutorial (#7) 🔀
10:13
Bro Code
Рет қаралды 8 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН