Best series on programming tutorials I've ever seen. Perfect humor to information ratio
@garlicyum91478 жыл бұрын
Also I love that you spell every single word wrong lmao
@the_infinity_snake Жыл бұрын
To give you guys a bonus, you can have both && and || as many as you want in the round brackets. And NOTICE, the || is the "border" of the tests. The || separates the tests. The compiler is gonna go through each test, one by one to check them. One by one.
@Honorenji9 жыл бұрын
I just love that you have a bit of humour in your videos :) Your videos really help. Already had a lot of knowledge from c# but the syntax is a bit different, so it's not hard to keep up luckily.
@edgykid42268 жыл бұрын
Same but with java.
@ktm6060MC8 жыл бұрын
Edgy Kid #42 Same here, learning Java and C++, neat seeing some things from Java, makes it nice that the commands are simular
@swapnilagnihotri22353 жыл бұрын
@@edgykid4226 same
@DavidNortonDRN10299 жыл бұрын
My C++ instructor is garbage and has horrible examples. In less than 10 minutes, I understood this more than ever by simply watching this.
@zuesr32778 жыл бұрын
Yeah his examples are engaging
@RoxusRemo8 жыл бұрын
6 year old with 4 dollars trying to get into a night club.
@lastofthestars64817 жыл бұрын
MATT DOBING HAHAHAH
@ferus55836 жыл бұрын
Matt Dobing xD
@soumithpotturi20909 жыл бұрын
Make sure you write you with a 9 and in as ion or the program wont work. XD
@hwudiwkbwhsysiwkmwbsoslkwaauyy10 жыл бұрын
Welcome to our night club, yo9ua re allowed ion.
@PS2Damon9 жыл бұрын
SpongyBacon thnak yo9ua
@SKreapergaming9 жыл бұрын
+SpongyBacon 5-star
@phonekhantpaing890811 жыл бұрын
I swear he's just getting funnier and funnier in every tutorial
@NorthboundFox13 жыл бұрын
Bucky, you forgot to explain that Logical Operators follow order of operation, too. You can do If( (age>21 && money>500) || money > 500){ //code } This will only allow people if A) They are BOTH 21 and have $500 B) They just have $500 but aren't old enough. Knowing this is very important as it shortens LO statements in the same way that LO statements shorten nested if() statements. It's a code compacter for a code compacter :D
@amulbham69289 жыл бұрын
gottta say, your little bit of humor combined with your casual delivery are hilarious and help get me through .
@AlbanianGamer3138 жыл бұрын
The program is called Watermellon :D at 3:24
@RufusShinraPower12 жыл бұрын
Thank you. I'm glad it was something short and not complicated.
@itishree48557 жыл бұрын
Becky is the coolest c++ tutor on youtube for sure.
@decimalpoint11177 жыл бұрын
This guy is a natural. Forget the rules; don't impress; just express! That's how Bucky does it. Woooaaahhh!
@abdinasirahmed71504 жыл бұрын
can't stop watching your tutorials!
@garretmkiii6 жыл бұрын
Bucky is an inspiration; he proves you can have but 10 thumbs still write code. Thanks for the tutorials, brother. "||" is a union; maybe "|" is a uniunion...
@2007excalibur200711 жыл бұрын
1:19 god fucking damnit lmao
@Braleven11 жыл бұрын
I always laugh when he points that shit out.
@SilverMiraii7 жыл бұрын
You can also use parenthesis just like when you do math. For example: if(age > 21 || (money > 800 && age>15 )) so now we're gonna allow people over 21, or people over 15 with at least 800 dolla bills
@jacobfields36456 жыл бұрын
Thank yo9ua!! I was coming here to ask this, now I guess i dont have to
@ScareTheater210 жыл бұрын
If you just write "and" instead of "&&" it would still work the same, and if you wrote "or" instead of "||" it would still work the same. So what's the point of writing && instead of and? Does it make a difference?
@hwudiwkbwhsysiwkmwbsoslkwaauyy10 жыл бұрын
Looks more complex, but provides no obvious benefits or downsides.
@mishoaleksidze782010 жыл бұрын
I'd better to use 'and' and 'or'. Why does anyone want to use these marks, when there's an existing of words?
@hwudiwkbwhsysiwkmwbsoslkwaauyy10 жыл бұрын
Some One In C++, and and or work, however in some other coding languages (I think php and java don't use and/or), so for people like me who have always used || &&, it keeps code consistent and avoids confusion :P
@mishoaleksidze782010 жыл бұрын
'And', 'Or' perfactly work in Python
@hwudiwkbwhsysiwkmwbsoslkwaauyy10 жыл бұрын
That's nice, use whatever you want.
@0tiii6 жыл бұрын
i'm now at the point where it became a game of "pls dont correct that spelling mistake i love it"
@sergyu12345613 жыл бұрын
The misspelling thing was so funny. I tell my classmates that too when they ask me if the program works if they change what's in quotes.
@3dUber12 жыл бұрын
thank you soo much i've been looking for this for ever. I use to use visual basic. So i was looking up a "and statment"
@magnolia11124 жыл бұрын
Such an awesome explanation. Thank you.
@MrSaemichlaus11 жыл бұрын
For the OR confusion: "||" is used for condition testing, like "if (1==1 || 2==3)" returns "true". "|" is used for comparing numbers on the binary level by their bits, like "2 | 4" returns "6" because 0010 | 0100 -> 0110.
@MrSaemichlaus9 жыл бұрын
This is a while back, I think what I wanted to say is that you can "combine" bits with OR and use that to check for any set bits. Knew it, misexpressed it ...
@TusharSharmatushar139928 жыл бұрын
this man is just awesome, too hysterical to be a computer programmer :P
@CheeseOfMasters7 жыл бұрын
this guy's giving me a lot of ideas for my future nightclub...
@psymaster33012 жыл бұрын
so glad i found these vids, now hopefully i can learn it fluently by the time i get to highschool! XD
@theseangle4 жыл бұрын
7 years passed by now... How are your coding skills?
@dark-_-001-kys3 жыл бұрын
how is it going brother did you become programmer ????
@dark-_-001-kys3 жыл бұрын
@@theseangle what about you 1 year passed how much you progressed
@theseangle3 жыл бұрын
@@dark-_-001-kys not much xD, coding was not required to much in this year
@psymaster3303 жыл бұрын
@@dark-_-001-kys Yes actually!!! I graduated with a bachelors in computer science last year, and am currently writing this while waiting to join a meeting with the rest of my team. Thanks for the nostalgia flashback!
@Qazqi12 жыл бұрын
You can. They are alternative tokens. There's also bitor, xor, compl, bitand, and_eq, or_eq, xor_eq, not, and not_eq. Because of older keyboards and C, there's also digraphs (look them up if you want to see them).
@sportshala15539 жыл бұрын
gajab h matlab maza aa gaya...tussi grate ho bhai.......robart bucky
@DowntownSusana9 жыл бұрын
Great explanation, thank you!
@abhistorm11 жыл бұрын
The point of this video is to let people know about "Logical operators" and hence the title.Too much knowledge is never too bad
@Luvu5evr12 жыл бұрын
With &&, if the first condition evaluates to false, no other statements are evaluated because the overall result will still be false. It only takes one condition being false to make the entire outcome false. With ||, if the first condition evaluates to true, no other statements are evaluated because the overall result will still be true. It only takes one condition being true to make the entire outcome true. With & and |, all conditions are evaluated, regardless of their result.
@sidforreal7 жыл бұрын
thank u very much...ur each nd every video helping a lot..
@exia7813 жыл бұрын
keep em coming bucky Thanks`
@sleepsleeper446611 жыл бұрын
*2 People wanted to make Minecraft clones then found out how hard it was to make text show up and table flipped*
@sleepsleeper446611 жыл бұрын
;_;
@sleepsleeper446611 жыл бұрын
***** The 2 people that disliked the video the- Yah... just uh... nvm... don't hurt yourself
@danielschieren279310 жыл бұрын
David James ^This i1.kym-cdn.com/photos/images/original/000/131/351/eb6.jpg
@sleepsleeper446610 жыл бұрын
;--;
@sleepsleeper44669 жыл бұрын
***** with any language, for you to make a viable procedural infinite voxel terrain with a biome system and tempature intergration indeed does take "much code" i supposs the term "much" would vary depending on how much the average person codes.. still, for a noobie especially in c++, it is somewhat of a hassle to do
@amulbham69289 жыл бұрын
also itd be easier to fully grasp how the programs/syntax were used if you inputed the variables cin>>x; instead of just giving the variables values to begin with. So a person can understand how a loop or if else statement is activated based on the input value.
@olivebates13 жыл бұрын
So around what episode are we gonna be getting to the fun part and making an actual graphical game (not to rush)?
@Wingerlang12 жыл бұрын
Clever side-notes like: Put the most likely positive test-outcome first, since it's waste to run more tests than usually needed! Should be way more common in even beginner-tutorials like this.
@rorygrice57589 жыл бұрын
Are there operators for exclusive or (XOR), and how to parenthesis work with logical operators, If i have (something && something else) || (thing && other thing), would that work, or do i have to go into multiple lines of code when i want something that sophisticated?
@vfxcrew13227 ай бұрын
hi one doubt logical operator is not working in while loop ,i use "or" condition but its not working
@geoffxc37349 жыл бұрын
"Say we're only 2 and we only have 4 dollars, probably from the tooth fairy. We're not going to be let into the club."
@mynameisspam19310 жыл бұрын
is there a logical operator for if neither is true then the program can run? I only ask because even though I am new, I can see that it might be helpful to run code only if something is not occurring elsewhere in the code. Might be a stupid question, haven't thought it out thoroughly honestly, I just want to know.
@KangarooLemonades12 жыл бұрын
Quick note, the logic behind it was: if((this and this) or (this and this) or (this and this))
@clay525134311 жыл бұрын
you sir have a new subscriber!!
@gyratingseacow59510 жыл бұрын
Is there a video that explains how to use operator % I know there is supposed to be a question mark at the end there but I didn't want to confuse anyone. I have an assignment on this and cannot understand how to use this correctly. any advice or links to websites would be greatly appreciated!
@awesome2471210 жыл бұрын
What if I wanted to use && and || in the same statement? What would be their order of execution?
@bestraub9810 жыл бұрын
I think its usually from left to right (don't quote me on this), but I would just use braces
@prinzecesartonares93322 жыл бұрын
just a quick question, can return -1 be used in if-else statement ? if so how ? I have tried to do this but it will skip the nxt statement. Heres my code #include using namespace std; class example { public: string x= "this variable came from example"; double y; }; int main (){ example W; cout W.y; if(W.y>2){cout
@RespectFalseIcons7 жыл бұрын
is it ok to but the OR and the AND operator in the same IF statement?
@RufusShinraPower12 жыл бұрын
I probably should have phrased that better. What I meant was what if say you had 3 variables. what would you type if any 2 variables had to be true, but any 1 could be false.
@MarijnKonings11 жыл бұрын
Becouse the functionality came originaly from AND and OR logic gates, wich are the base building blocks for alot of things including processors. Look it up on wikipedia if you're interested in it :P.
@olivebates13 жыл бұрын
@olivebates Whoops, was a little to fast there ^^;
@makennedy52412 жыл бұрын
I learned to use "and" and "or" instead of those symbols, they are interchangable right? Is there a reason to use those over the text, it just seems like extra stuff you'd have to memorize.
@LoganMeyers034 жыл бұрын
If you look above your enter key and see... (Me with one of those keyboards where the enter key is upright): ...Backspace?
@DJLad1612 жыл бұрын
You can also use the actual word "or" instead of ||
@Possen9312 жыл бұрын
the simple & compares the numbers (only integers and characters if im not mistaken) in a bitwise level. meaning that it compares every single one of their bits and then produces a result that ia not a boolean type and in many cases it isn't even 0 or 1. I think that is the difference :/
@cwelsh201010 жыл бұрын
Really helpful thank you!
@crisag.269810 жыл бұрын
I am using Eclipse. I was wondering if anyone knows how I can get my programs to run in that black window that I *think* is called a shell? Mine at the moment are only running in the console in Eclipse itself.
@akshaybirajdar288210 жыл бұрын
In windows , consol is in Black color, while eclipse use its own consol.
@crisag.269810 жыл бұрын
Akshay Birajdar So there is no way to have the consol pop out in its own separate window?
@departmentofeducation721210 жыл бұрын
If you want it to run the program in the BASH of your windows computer then you could find a way to use the gcc compiler from the console (which can be accessed through typing cmd in the home search menu) or just using a program that runs it from the bash directly like code::blocks. However, it really doesn't matter whether you're running it from either the bash or a program's own console as long as you have the environment setup on your computer and not on someplace like an online IDE.
@akkiheat9 жыл бұрын
Crisa Gazzola : Actually you can use Qt Creator , its much better than eclipse and (by choosing console application) you can get your program to run in black window ;)
@RufusShinraPower12 жыл бұрын
in the part about the "or" operator, what would you type if any two variables could be true?
@Qazqi11 жыл бұрын
Bitwise XOR is ^, logical XOR is != (yes, it happens to be the exact same semantics), which also means XNOR is ==, and there's really no point to providing the others when we have !
@hellonicolerlearns87244 жыл бұрын
"But what if you say this... I'm not the most professional nightclub owner." 😂😂
@stanleyliew14509 жыл бұрын
how to do this buckey? Write a program that asks a user to enter his/her marks. If the marks entered is >= 50 and
@coconutko62669 жыл бұрын
this is easy ...do you still need help ?
@wheresecretslie Жыл бұрын
#include using namespace std; int main(){ int mark; cout > mark; if (mark >=50 && mark
@KingKilleer968 жыл бұрын
in c++ u can use "and" insted of && and "or" insted of || :)
@AdamHBr8 жыл бұрын
Yeah I was wondering about this seeing as how that's how it is in the majority of other languages.
@VintageLJ8 жыл бұрын
I find using the && || versions improves readability of code.
@ZShadow489912 жыл бұрын
Before I learned this I was just using whatever knowledge I had of it and figuring the other things out... and I noticed two things I was doing differently. First, I was using the & sign instead of && when running tests, like if(n!=0 & f!=0 & f!=5) and it worked fine... what is the difference between & and &&? Second, I found that , seemed to do exactly what || does... could someone explain the difference?
@bryanswaggbeast81948 жыл бұрын
are they called straight slash? because they are next to the back slash i think.
@bryanswaggbeast81948 жыл бұрын
+Bryan SWAGGBEAST maybe var seperator? or cbar hahahahhaha not really
@RoxusRemo8 жыл бұрын
+Bryan SWAGGBEAST They are called pipe usually.
@minhkhoitran41676 жыл бұрын
love your work
@MrEpicSpace10 жыл бұрын
You can also use the word "and" instead of the weird && also you can use "or"
@ozaybakrhan683310 жыл бұрын
no you cannot in c++.
@MrEpicSpace10 жыл бұрын
really? because it works for me.
@ozaybakrhan683310 жыл бұрын
***** hım.maybe because i use microsoft Visual c++.
@YaboiKin10 жыл бұрын
***** I tried it as well in VS 2013 and it didn't work. Strange that it works for you as you'd think it would fail on everybody's. You sure your code is not just failing to compile and so displaying previous code?
@cucxtract10 жыл бұрын
***** and, or works fine for me.. using code::blocks 13.12
@dhruvkhetrapal42799 жыл бұрын
Can we mix and and or both the operators in a single if statement.?
@yoferenuntar64819 жыл бұрын
dhruv khetrapal of course the "and" operator will be executed first
@dhruvkhetrapal42799 жыл бұрын
Thanks :)
@olithepolo12 жыл бұрын
sorry but what did you write for gender ? (im french so sorry for my bad english) did you write like "string gender = female;" or "int gender == female" or something like that ?
@mrkingofgameplays12 жыл бұрын
Just one thing, you can just use and as &&, i once tried it and it worked so i guess it should work to use just type like if(age>21 and money>500){code}
did you enter "yo9ua re allowed ion"? Because you must enter "yo9ua re allowed ion".
@istvanherpai38039 жыл бұрын
What if I want the program to run this code when only one of the conditions is true and the other one has to be false? (Both of them can neither be true or false at the same time.)
@coconutko62669 жыл бұрын
use or
@meikonishi8 жыл бұрын
+István Herpai if ( ! ( (a && b) || (!a && !b) ) )
@meikonishi8 жыл бұрын
+István Herpai or, if ( (a && !b) || (!a && b) )
@MarijnKonings11 жыл бұрын
For longer decimal numbers you use double instead of float, but for higher numbers then unsigned int's? I have no idea... Unsigned intergers go from 0 to 4294967295
@RagePeanut8 жыл бұрын
I was wondering how to do the XOR operator (exclusive OR, which means if only one of them is true) and I found out it is != if anyone is interested in knowing that ! ;)
@richterp.mayandoc26692 жыл бұрын
can you explain why didn't you used return 0; ?
@ItsZ-00016 жыл бұрын
Hey Bucky ! Please make a series of tutorial about Visual basic C++ windows form !
@doCtOrHx12 жыл бұрын
so this is where the smart kids spend their time.
@masalahberat9 жыл бұрын
i spelled it you. and my program crashed. :(
@lastofthestars64817 жыл бұрын
hey what are you doing now days, how much far you are in your programing journey :))
@priyanksisodia4 жыл бұрын
@@lastofthestars6481 +1
@evanmastermind10 жыл бұрын
| = vertical bar in ASCII encoding.
@easygaming79349 жыл бұрын
Hi +thenewboston, im wondering why wouldn't you just use a , instead of &&??
@easygaming79349 жыл бұрын
+Peterolen Ah ok, thanks for the answer mate :)
@SergeantBalthazar12 жыл бұрын
What's funny is that | is actually called a pipe.
@ciyvi911 жыл бұрын
how to do when you compare 3 things and you want to be at least 2 true???
@dibbiepk11 жыл бұрын
I dont think this ones related to the video, but the operator for "And" is "||" So in an if statement: int age = 10; if (age == 10 || age < 25){ cout
@dibbiepk11 жыл бұрын
Dibbie Knight Opps, sorry: "And" is "&&" and "Or" is "||", Im use to coding in Java, and || also means And... Though my test worked for both being true with || so I guess it could be used either way.
@RedCrusaderGames11 жыл бұрын
Dibbie Knight in Java || does not mean "And"! I've programmed in Java for quite a while now and it means "Or" and && is "And"
@abubakirabdulkadir73402 жыл бұрын
essentail to every student
@dibbiepk11 жыл бұрын
Completely out of context of this video, so if theres any advanced coders (tho I assume its simple), int/float/etc only go up to 10 digits, before u get a error, how would u extend that to lets say 100 digits? Like if you have a money system in ur game that goes up to like trillions, thats 12 0's, so the user would never be able to make that if ur moneys managed with a default 10-digit limit int, right?
@ivandrofly11 жыл бұрын
The insert key make the arrow going down
@farazhusain9255 жыл бұрын
can we use && and || in combination...
@MrDragonshear12 жыл бұрын
If I use && and || will it open a black hole to another dimension?
@TensinghJoshua12 жыл бұрын
This compares integers. But how do we compare words? Like, balloon || doll ? I tried it with string but I couldn't get it.
@wheresecretslie Жыл бұрын
#include using namespace std; int main(){ string word; cout > word; if (word == "balloon" || word == "doll"){ cout
@Telseilong13 жыл бұрын
there called the pipe symbol, knowing is half the battle.
@phonekhantpaing890811 жыл бұрын
How many values can be used in an equation at one time?
@southparkclips2214 жыл бұрын
Hello, I think you forgot the third logical operator which is the "not" or "!" Symbol
@ankitpaul94469 жыл бұрын
Why we just can't use & instead of && as the former one works fine here???
@jintarokensei33089 жыл бұрын
+Ankit Paul Logicals deal with statements. Bitwise deals with data. Bitwise can work for statements, logical can't really work for data.
@HrCobra98 жыл бұрын
Can you use "or" instead of || and an "and" instead of && works fine for me
@Masot11110 жыл бұрын
I was making my code and i had a problem with the logical operators. i had this: int x; if (x=="yes") ... and it worked. But when i tried adding more options I think it was doing things in an order i didn't wanted. And the result wan't succesfull. if (x=="yes" || "Yes" || "YES") ... I tried using brackets to change the order, but an error went out. if (x==("yes" || "Yes" || "YES")) ... Can anyone help me solve my problem please.
@13Shafiq6669 жыл бұрын
+Masot111 you need to set variable x with a string not an interger. simply by put in the header #include and string x;
@lifetycoon10113 жыл бұрын
it works with correct spellings also! why does bucky say otherwise??
@TheDarksiderrr12 жыл бұрын
5:15 made my day ;D
@Jack-424213 жыл бұрын
you should do >=21 because people that are 21 are adults so they are allowed to go in with your script you have to be at least 22 years old
@fullthrottle2548 жыл бұрын
can you have for ( test || test || test && test) ?
@thavrisco16328 жыл бұрын
Try it
@m14k15ts2911 жыл бұрын
The or logical operator can be found over the tab button on the left of your keyboard if you're using a European keyboard.
@transformersloverjon13 жыл бұрын
At first I actually thought we needed to spell it ion
@raheel168013 жыл бұрын
i want a code in c++ which can give serial number of ram and hard disk in windows os.. can any one help me in this regard?