CONDITIONS and BRANCHES in C++ (if statements)

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Twitter ► / thecherno
    Instagram ► / thecherno
    Patreon ► / thecherno
    Today we're going to be taking a look at conditions and branches in C++, which basically means if, else if, and else statements. This is an important part of logical programming where we decide to execute certain blocks of code depending on a certain condition. We go pretty in-depth in this video so make sure you watch until the end!
    Linked Videos:
    Debugging ► • How to DEBUG C++ in VI...
    How the C++ Compiler Works ► • How the C++ Compiler W...
    Variables in C++ ► • Variables in C++
    Series Playlist ► • C++
    BEST laptop for programming! ► geni.us/pakTES
    My FAVOURITE keyboard for programming! ► geni.us/zNhB
    FAVOURITE monitors for programming! ► geni.us/Ig6KBq
    MAIN Camera ► geni.us/CYUQ
    MAIN Lens ► geni.us/ZM3CmG
    Microphone ► geni.us/wqO6g7K
    Slack ► slack.thechern...
    Stream ► / thecherno
    Website ► www.thecherno.com
    Facebook ► / thecherno

Комментарии • 454

  • @12isaac00
    @12isaac00 5 лет назад +556

    "else if is just an if nested into an else"
    my life is a lie

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 4 года назад +6

      _EDIT: I'm letting the old example rot at the end, as it caused a lot of confusion. You'll eventually see even this example is wrong, but it better illustrates my thought process at the time._
      If "else if" is just a nested if into an else, then this block of code should compile, but it doesn't:
      #include
      using namespace std; //Sorry guys I couldn't resist
      int main() {
      int x = 7;
      if (x == 7) cout

    • @beesknees8296
      @beesknees8296 4 года назад +34

      @@VivekYadav-ds8oz Not sure if I am completely understanding what you're saying but the reason that code does not compile is because you cannot have a stand alone else. If...else come in pairs and else are linked to the closest incomplete if. Your first else is paired with if and the second else is not paired with anything. That is why the program doesn't compile.

    • @NphiniT
      @NphiniT 4 года назад +10

      @@VivekYadav-ds8oz else-if is a nested if into an else not else. That is, else is not a nested if into an else!

    • @NphiniT
      @NphiniT 4 года назад +2

      @@beesknees8296 You don't get it LOL!

    • @bharat_132
      @bharat_132 4 года назад +11

      I kinda understand what you say...
      Let me try to explain , I may be wrong... Plzz feel free to correct me...ill just wright the code part
      ,......,.............
      If(x==3) cout

  • @zyris863
    @zyris863 7 лет назад +518

    I'm in college and you explain this stuff a lot better than my professors. Thank you so much for this. Keep it up!

    • @spattermann5809
      @spattermann5809 6 лет назад +39

      When the professors or TAs (teaching assistants) actually speak english (not a given) they don't actually teach instead they are culling. You only pass if you can teach yourself from over-priced and badly written textbooks or already know the material. To say I am disenchanted with US higher education is a broad understatement.

    • @klarnorbert
      @klarnorbert 4 года назад +15

      This is why you don't go college if you want to do software engineering.

    • @guilhermezardo7671
      @guilhermezardo7671 4 года назад +3

      @@klarnorbert you can do both

    • @appsenence9244
      @appsenence9244 3 года назад +4

      why would anyone attend university?

    • @yeadatwunyt8004
      @yeadatwunyt8004 2 года назад +4

      @@spattermann5809 It's not just the US

  • @kauht
    @kauht 6 месяцев назад +62

    6 years later and this is still the highest quality c++ tutorial on the internet, thanks!

    • @weltgeist.
      @weltgeist. 3 месяца назад

      ikr

    • @rowansteve-ng3fs
      @rowansteve-ng3fs Месяц назад

      you haven't seen this channel called code beauty

    • @NovacStudios
      @NovacStudios Месяц назад

      @@rowansteve-ng3fs Isn't she the one who does them like 10+ hour vids?

  • @henrikhey4184
    @henrikhey4184 7 лет назад +524

    Please make some assembly tutorials!

    • @小龙的梦
      @小龙的梦 7 лет назад +10

      why

    • @merijnvinea3546
      @merijnvinea3546 7 лет назад +2

      Henrik Hey Do it!!

    • @henrikhey4184
      @henrikhey4184 7 лет назад +35

      cronnostiger64 personally, I think that assembly is extremely useful, especially when it comes to optimization. If you look at the source of any major game engine they all have parts written in assembly.

    • @henrikhey4184
      @henrikhey4184 7 лет назад +6

      ***** No problem! Check out the source for the idtech3 engine (doom3 engine) sometime it's all on github and really shows off the full power of c++ :) it's one of my favorite piece's of source to read through!

    • @henrikhey4184
      @henrikhey4184 7 лет назад +5

      *****​​​​ Absolutely! I would however recommend reading through the Idmath library in the project in that case :). I understand computer graphics somewhat, I still struggle with the API's however lol(opengl and vulkan), as for learning it, I'd recommend the tutorials offered by the cherno, thinmatrix(even though he uses java, the GL is the same) also recommend checking out the computer graphics series by computerphile(they give an awesome explanation of things like how matrices work, how the scene is rasterized and how the depth buffer is created!). And overall reading through blogs is also extremely useful, just remember to start with the fundamentals and work your way up!

  • @danielandrejczyk9265
    @danielandrejczyk9265 7 лет назад +213

    "Compiler will do some magic... and you'll get rekt" XD

    • @sablanex
      @sablanex 7 лет назад +13

      Best part :)

    • @martingaens2073
      @martingaens2073 4 года назад +4

      i thought it was 'get rekt' lol. Even youtube auto generated subtitles say it's get rekt.

    • @joshuarowe8410
      @joshuarowe8410 4 года назад +5

      @@martingaens2073 holy shit that's pretty funny. Im surprised the auto-generated subtitles use 'rekt'

    • @martingaens2073
      @martingaens2073 4 года назад +6

      @@joshuarowe8410 yeah, I guess it has to adapt to the meme culture

    • @danielandrejczyk9265
      @danielandrejczyk9265 4 года назад +2

      Fixed wrecked to rekt... nice

  • @w3w3w3
    @w3w3w3 5 лет назад +6

    Great video again. Really interesting as well, and you explain the 'ins and out' of things as well, instead of just typing code and us copying it with no real understanding, which a lot of other people just do. Thanks for putting in the time to make these videos and series.

  • @ommaswale1454
    @ommaswale1454 Год назад

    can't believe this cool playlist was created 6 years ago

  • @Tomasxt25
    @Tomasxt25 7 лет назад +79

    I would love some assembly videos!!!! Great video anyways

  • @kanutaro3426
    @kanutaro3426 Год назад

    The dissassembly part was brilliantly explained, first time I'm actually understanding this

  • @thepollardbull
    @thepollardbull 3 года назад +28

    Good distinction of programming falling into two categories,
    1. Mathematical programming
    2. Logical programming

  • @xristosbart8217
    @xristosbart8217 7 лет назад +52

    Please, a video for a brief explanation in assembly would be a good idea, not in great extent, just enough to follow debugging.
    Also, I think you should start the OpenGL series in parallel looking forward to that!
    Great series, we appreciate the fact that you go deeper in some points, it gives us a better understanding.
    Keep up the great work!

  • @TheRossmclane
    @TheRossmclane 6 лет назад +57

    Please make videos on assembly! These are so cool.

  • @itsNixy
    @itsNixy 2 года назад +1

    @The Cherno Your C++ series is absolutely amazing. Please, please do make a series on Assembly as well!
    Thank you for your great explanations. As someone with some previous experience, I still learn new things in almost every one of your videos in this series.

  • @fendoroid3788
    @fendoroid3788 7 лет назад +149

    do you code like this
    {
    }
    or like this {
    }
    ?

    • @pradyumnkejriwal3007
      @pradyumnkejriwal3007 7 лет назад +26

      Fendoroid
      In functions, 1st one
      In if, while, etc. statements, 2nd one

    • @lewisb8634
      @lewisb8634 7 лет назад +44

      Fendoroid Always the second one. I find it a lot clearer, although I can understand why people may find the first one clearer. Which one do you use?

    • @jonatanahnh
      @jonatanahnh 7 лет назад +14

      Depends on the language convention
      For example in js the convention is {
      } but in c
      {
      }

    • @resantic2256
      @resantic2256 7 лет назад +39

      {
      }
      Makes it easier to see which brackets make up a block together

    • @fendoroid3788
      @fendoroid3788 7 лет назад +3

      Lewis B I used to put the open brace on a new line, but now I put it on the same line: it looks more compact.

  • @amirrezasadeghi5755
    @amirrezasadeghi5755 5 лет назад

    thanks for explaining things from scratch. it is so valuable to see what actually is going under the hood of the c++. thanks a lot.

  • @BOTHLine
    @BOTHLine 7 лет назад +73

    Yes, please an assembly tutorial!

  • @Steven-tw7iz
    @Steven-tw7iz 7 лет назад +22

    I think an assembly tutorial/video would be a great idea. It really shows how the code write will end up working down at the metal. And gives new people a look into just how much the compiler can optimize your code without you realizing

  • @pf8662
    @pf8662 3 года назад

    Please assembly tutorial! Your explanation is so clear and detailed! I had learned so much from you everytime despite my school had teach the topic before.

  • @praveshgaire3437
    @praveshgaire3437 5 лет назад

    Always learn new things from you (else if), never skip easy topics.

  • @harshalrathi8332
    @harshalrathi8332 2 года назад

    Hi Cherno, this series is well bought up, thank you for detailed explainations, mistakes and corrections, some new pts. and explaining via registors too. This was super fun and I hope you keep making new such videos. Thanks...😊😊😊😊

  • @motionsmoments6254
    @motionsmoments6254 3 года назад

    I liked the videos so much that at this point I click the like button before actually watching the videos... :)

  • @straddlescout1220
    @straddlescout1220 6 лет назад +25

    "The little bit extra" This is why I love this series

  • @foti4822
    @foti4822 Год назад

    Love this series so far. I like how you show things like viewing the disassembly and debugging in visual studio. 👍

  • @lokeshgubbala622
    @lokeshgubbala622 10 месяцев назад

    this integrated environment teaching helps us a lot!!!!! ✌️

  • @rishi3
    @rishi3 5 лет назад +3

    yes , we want some assembly tutorials

  • @jimtc1000
    @jimtc1000 3 года назад +1

    Thanks gret video my lazy college professor had me watch this to learn about if statements . The college should give you his paycheck.

  • @sofianbenhamman2038
    @sofianbenhamman2038 3 года назад

    yes. we want the assembly video pls. You are the best at teaching!

  • @qidex
    @qidex Год назад +9

    You cover a lot of basic things I'm already thoroughly familiar with, but you do it in such a clear progression of explanation.
    You also still have some things that are new to me, like the dissassembly view.
    May not be what I personally need, but very well done.

  • @codebitcookie8053
    @codebitcookie8053 2 года назад

    The Else If didn't excite me because I already learnt Lisp and I learnt it better there with the macros.

  • @greob
    @greob 7 лет назад +35

    22:15 this is precisely why I am super excited about your tutorials. I'm really keen on understanding what makes, and how to make efficient code. Every time I use a condition statement, I freak out in my head. But I never know how to optimize my code. Thanks for doing these great videos. :)

  • @mbyb6817
    @mbyb6817 4 года назад +3

    Please make a video with examples of logic vs mathematical program flow.

  • @kickbuttowsk2i
    @kickbuttowsk2i 4 года назад +12

    that "else if" part alone convinced me to watch the entire series

  • @palmasalazar2113
    @palmasalazar2113 Год назад

    ¡Te amo cherno! Sigo esperando tu video acerca de ensamblador.

  • @jakhongirnematov5588
    @jakhongirnematov5588 3 года назад +13

    This series is extremely helpful, thanks for the simple yet deep explanations. And yes, if you have time can you make an assembly tutorial?

  • @DTQC
    @DTQC 4 года назад +1

    wait, how can you can you pointer of char arrays? at 19:20? Wouldn't that just compare the address of the char arrays and only works by chance due to a lucky compiler optimization?

  • @choosyguytest719
    @choosyguytest719 5 лет назад +1

    else if blew my mind :)

  • @UTRG-UnderTheRain
    @UTRG-UnderTheRain Год назад

    The compiler will do some of this magic and you will just get wrecked :D that made me smile

  • @nicklandreth2527
    @nicklandreth2527 4 года назад

    I would also be interested in learning some assembly for a deeper understanding if you ever get there.

  • @minecraftcookie2929
    @minecraftcookie2929 Год назад

    The cherno brings up assembly !
    My brain: left the skull

  • @chimpionboy
    @chimpionboy 6 лет назад +10

    Wow. Interesting. I'm so in love with C++

  • @kenedymatiassoportella808
    @kenedymatiassoportella808 2 года назад

    That is gold! Thank you.

  • @farivarfarsian3350
    @farivarfarsian3350 3 года назад +1

    Please Create Assembly Language Tutorials @TheCherno

  • @deltarambo6230
    @deltarambo6230 4 года назад +1

    Cherno, you should have mentioned at least one example where you replace a logic operation (e.g., a branch) with an equivalent mathematical operation (or arithmetic to be exact). In my opinion, in the vast majority of cases, you can't replace logic with arithmetic. At the end, a program of any reasonable size needs a combination of both in order to complete its job.

  • @kevnar
    @kevnar 7 лет назад +31

    If(var == true) bugs the heck out of me. I read it in my mind as if(true == true), and it seems so redundant. Just write if(var).

    • @adolfomorgado1422
      @adolfomorgado1422 7 лет назад

      kevnar var == true is actually var == 1

    • @TheMike6452
      @TheMike6452 6 лет назад +3

      EM even more late but (var != 0) :D

    • @mue6524
      @mue6524 6 лет назад

      it is actually completely correct. true evaluates to 1, but any integer that is not false/0 evaluates to true but is not equal to true itself.

    • @patrickflores7714
      @patrickflores7714 5 лет назад +1

      @@DireDanOriginsDEV The compiler would make var = 1 because var is a bool. Just like var = 5 * 2 gets compiled into var = 10 in the compiling stage.
      bool var = 5;
      if(var == 1)
      {
      Log("This will get printed");
      }
      Its best to step through it to see this happen. Check out the memory.

  • @bopon4090
    @bopon4090 3 года назад

    If you are beginner then look for conditional operator. That would help a lot

  • @mat13channel
    @mat13channel 4 года назад +2

    You can replace logical programming by doing mathematical operations instead? Wow, I am really intrigued in what you meant by that... I hope there'll be such example in later lessons.

  • @krec348
    @krec348 7 лет назад +1

    This series really help me to bold my programming bases :p and learn some cool concepts that i didn't know. Thank you

  • @dani485b
    @dani485b 7 лет назад +4

    20:58 "else" "hand gestures* " if"
    have to love that explanation, nice video as always Cherno! :)

  • @VivekYadav-ds8oz
    @VivekYadav-ds8oz 4 года назад +2

    If "else if" is just a nested if into an else, then this block of code should compile, but it doesn't:
    #include
    using namespace std; //Sorry guys I couldn't resist
    int main() {
    int x = 7;
    if (x == 7) cout

    • @explorerofworlds512
      @explorerofworlds512 4 года назад +1

      @Peterolen No I tried to nest an if statement inside an else it gives you the below error
      : error C2181: illegal else without matching if
      If they were truly the same else if & else {if} would behave the same way and either both or neither would give compile errors

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 4 года назад +1

      @Peterolen Exactly my point. If you could write multiple else-ifs, AND else-if was just else {if ...}, then I had done literally nothing wrong here. Then, it wouldn't be wrong to say that compiler doesn't allows multiple else-ifs, but allows multiple else clauses (because else if = else {if ...}).

    • @explorerofworlds512
      @explorerofworlds512 4 года назад +1

      @Peterolen That's not what I have found. If you use else if and have an else statement right below it, its fine, no errors. But if you nest the if statement then it does throw you that error.

  • @aleksandarfranc1094
    @aleksandarfranc1094 5 лет назад

    Chord before last one sounded like crash hahah anyway good lecture.

  • @haiderbassim3029
    @haiderbassim3029 Год назад +1

    19:45
    O M G 😵😵😵

  • @kriszenn1125
    @kriszenn1125 3 года назад +1

    "branching makes your program slower"
    *glances at yandere dev*

  • @madhuhadas15370
    @madhuhadas15370 5 месяцев назад +1

    I am glad I found this channel. Thank you very much.

  • @abhinaybandaru9953
    @abhinaybandaru9953 6 лет назад

    Great Work, Could you provide some exercises in your way to work with, that would be awesome.! Thanks

  • @linodev5540
    @linodev5540 2 года назад +4

    I like how the view count keeps dropping, showing how people are giving up lol

  • @gdkor
    @gdkor Год назад +1

    19:40 Can someone explain why did comparison ptr == "Hello" return true if as far as I remember it compares the address that ptr contains and the address of the temporary object and it must never be true

    • @Netpilation
      @Netpilation Год назад +1

      exactly i was thining the same

  • @asifkhan-mr8nj
    @asifkhan-mr8nj 10 месяцев назад

    great video

  • @breachplanting7398
    @breachplanting7398 5 лет назад

    deep and detail!

  • @lewisb8634
    @lewisb8634 7 лет назад +1

    I'm really curious about what Cherno mentioned at the very end. I thought I knew everything that was going to be discussed, and I did, only up to that last bit. Does anyone know of any sources on this topic? How would an if statement be replaced with a some 'mathematical operation'? Unless I'm already doing this and Cherno's description has not reminded me of what I usually do. I'm confused now!

  • @mirzakadic9174
    @mirzakadic9174 Год назад +1

    Else If is not a keyword... Mind blown :D

  • @abhay29
    @abhay29 3 года назад +1

    Assembly tutorial please

  • @richardrisner921
    @richardrisner921 3 года назад +1

    What I learned about C++ today: "anything really goes"
    This is even better than Python!

  • @linavabai8470
    @linavabai8470 Год назад +1

    Thanks! I'm learning so many new stuff from your videos.

  • @resantic2256
    @resantic2256 7 лет назад +3

    So if I understand, if you can convert an if statement into a mathematical operation to make it faster you should do do? Won't the compiler in release mode with optimizations on do it for you?
    Because of the unintuitive way to write it it might be harder to understand when debugging or when looking at the code at some point later in time.
    Also, how long do you estimate it to be until you move on to actual programming of useful applications/games?

    • @mytech6779
      @mytech6779 7 лет назад

      Conditional branching in the logic is the issue, not that it is an if statement specifically. The cpu (a single core) can work on several parts of the code concurrently (it has separate sub-units for comparisons, adders, float multipliers, register moves, prefetching lines of memory or cache, etc) If there is a conditional branch it won't know which way it should work ahead.
      Very modern machines (that do not run on a battery) use branch predictors that will work ahead based on the odds of the conditional, this can speed up long running programs but on individual conditions if it predicts the wrong branch all the working ahead is useless. (and the extra unused processing is wasted electricity)

  • @hexhackbangla8368
    @hexhackbangla8368 5 лет назад +1

    i have found video version of wikipedia..

  • @manmohan_manoj
    @manmohan_manoj 4 года назад +1

    but we can do multiple else if, and only one else statments. How does that work?

    • @manmohan_manoj
      @manmohan_manoj 4 года назад

      @Artem Katerynych see my problem with that is that it is nesting, it just looks wrong doesn't it, I don't know maybe I'm basic but I'm not the big on nesting that deep you know. Once it's cool but it is basically unlimited and therefore it's unlimited nesting.

  • @trantrungkien2790
    @trantrungkien2790 3 года назад +1

    hello can u give some example of using other calculation instead of comparison?

  • @woolwizard1967
    @woolwizard1967 4 года назад +2

    It's so fascinating how i can still learn stuff about these things, that i already used for years in your videos. Simply amazing

  • @FrostyChilli
    @FrostyChilli Год назад +1

    The else-if explained at 20:08 works under a limited condition.
    You claim that:
    if () {}
    else { if () {} })
    ==
    if () {}
    else if () {}
    This is true only when there is only 1 if and 1 else-if statement. As soon as you append either other else-if statements or a final 'else' statement, this logic breaks. Because you cannot have
    if () {}
    else { if () {} }
    else {}

    • @ichigonixsun
      @ichigonixsun Год назад +2

      The syntax for if/else as defined in the formal language is:
      if (expression) statement else statement;
      Where an expression is just any group of symbols and operators that evaluates to a value, and a statement is any command that carries out a task or a set of many other (sub)statements.
      But the if statement itself is a statement too (duh). That's why the following are equivalent:
      if (condition) {}
      else if (condition) {}
      else {}
      ---
      if (condition) {}
      else {if (condition) {}
      else {}}
      Note that the only thing that changed in the second example is that i added extra (redundant) curly brackets around the if statement, turning it into a compound statement containing only one statement.
      Your example does not follow the grammar, because there is an "else" keyword without a matching "if" keyword.

    • @FrostyChilli
      @FrostyChilli Год назад +1

      @@ichigonixsun I see. And in the case of multiple 'else if'-s, they just go deeper? So:
      if () {}
      else if () {}
      else if () {}
      else if () {}
      else {}
      becomes
      if () {}
      else
      {
      if () {}
      else
      {
      if () {}
      else
      {
      if () {}
      else {} // final else in case expressions in all previous if () statements return false.
      }
      }
      }

    • @ichigonixsun
      @ichigonixsun Год назад +2

      @@FrostyChilli Exactly, you got it.

    • @FrostyChilli
      @FrostyChilli Год назад +1

      @@ichigonixsun Thanks for the explanation!

  • @eshgholah
    @eshgholah 4 года назад

    dword ptr is not a register, please correct it in your next video. The cmp instruction in this example compares the value which is 5 directly to the content of if the x variable. 🙏

  • @jeremygong4190
    @jeremygong4190 2 года назад +1

    I love your vids not only because every time I've learned so many new tricks within the old boundary of my knowledge; but also, I was able to understand the principle and the reasoning behind it. Those vids do make everything look so transparent, and do enhance my thought to view the codes in a much grander perspective. It feels like the difference between solving a physics problem using mere equations from the book (seek-and-match progress) and solving this problem by your understanding of its mathematical principle (deriving your own equations). GROUNDBREAKING lessons! I will spent the rest of two days finishing every single vid from this watch list!

  • @nfrancisj2122
    @nfrancisj2122 5 лет назад +1

    You talk so much, and I love it. The depth of your explanations really helps explain why things work the way they do. Thanks!

  • @pierrefiore6933
    @pierrefiore6933 Год назад

    Int x = 5 followed by an IF testing for x == 5 will always execute the block and the block after the else, will not even be compiled. Also....the pre compiler will run your code with the initialized variables (or a default value) and do a dry run on your program...dumping code that is "always true"....beware

  • @painfullyhuman
    @painfullyhuman Год назад

    it pisses me off that after reading a 1200-page book your videos are not only more succint but more helpful than anything in it

  • @nikhilrajbhar
    @nikhilrajbhar Год назад

    Please Make a video on Assembly, I have this course of computer architecture and I have to make projects in RISC V, x86 and x64 assembly, I cannot find any better source to learn.

  • @sal96ali
    @sal96ali 4 года назад +1

    Hi, thank you so much. You are doing a great series

  • @jiashuwang4446
    @jiashuwang4446 Год назад

    something interesting:
    if you define two integer variables: a and b
    and then initialize it with 0 and 1
    now here is a if:
    if(a&&b++){
    ;
    }
    and after the if, the b is still 1
    but if we change the condition:
    if(a||b++){
    ;
    }
    this time b == 2
    when I encountered this, I was amazed that the PC was not as stupid as I once had thought. It is clear about the condition structure. If there is a && structure, judge will end immediately after finding a false proposition(im a beginner, maybe there are some misunderstandings)

  • @explorerofworlds512
    @explorerofworlds512 4 года назад

    else if
    vs
    else {if} cannot be the same. Because if you use else if with another else statement it works the way it should; but else {if} having another else statement gives you this error.
    : error C2181: illegal else without matching if

  • @mishaisbetterthanall
    @mishaisbetterthanall 3 года назад

    But Cherno, else if (...) and else { if (...) } are not the same thing because after "else if" you can add additional else statement, but after "else{ if () }" you can't

  • @VivekVarghese-r5s
    @VivekVarghese-r5s 6 месяцев назад

    I'm not full convinced about the " else if " concept because if that was another " if " within the body of "else" then it should have been within a curly brackets denoting it's body as for multiple line of codes it should be inside the curly brackets. And what about the last "else" after the "else if " . can u explain that part too...

  • @raisadel5787
    @raisadel5787 3 года назад

    I've come this far and yet I must ask, what is cin.get(); ?? The only difference I get when I run my program with or without it is the fact that, without it, I have some sort of "confirmation" or information that the program has run till the end, and with it, it just runs the program without any additional text

  • @MegaFirst123
    @MegaFirst123 7 лет назад +1

    Ahhhh assembly... tedious but fun.

  • @giannischasandras6514
    @giannischasandras6514 2 года назад +1

    i pressed f10 to go to the next video

  • @JuantheJohn1
    @JuantheJohn1 3 года назад

    When you have
    const char* ptr = "Hello";
    and you print prt
    Wouldnt it print the address of "Hello" since it's a pointer?

  • @bloodwolf8307
    @bloodwolf8307 4 года назад

    good

  • @candle-likeghost9523
    @candle-likeghost9523 3 года назад

    When you bool variable into any number larger than 0, the compiler will make the variable set to 1 instead of the number. sad.

  • @fardawshassanshuvro
    @fardawshassanshuvro 4 года назад

    We want a video for assembly language and a video about why we shouldn't use if with what is the other efficient way of if.... please we are waiting for it for a long time.....

  • @augustlehman6462
    @augustlehman6462 8 месяцев назад

    great! tutorial, in depth tutorial, on not only C++ but on computer programming in general; many thanks,

  • @AnirudhBalram-g1o
    @AnirudhBalram-g1o Год назад

    If else if is not a keyword, how are we able to place an else at the end of the control block? Was just curious. But this tutorial is by far the best I have seen so far

  • @voszvaivaldtkoszikovokh6418
    @voszvaivaldtkoszikovokh6418 Год назад +1

    Yandere dev needs to see this :^)

  • @JFrameMan
    @JFrameMan 7 лет назад +1

    I wish I had learned programming from the beginning the way you're teaching this.

  • @Plasticcaz
    @Plasticcaz 7 лет назад +1

    I've have a little knowledge about assembly and machine code, but it still seems quite foreign to me. I'd not be dissapointed to see one or more tutorials dedicated to assembly.

  • @hbfl3x50
    @hbfl3x50 4 месяца назад

    am becomin the C++ pro-master in my countryy, watch me, all thankss to you 👏👏

  • @autumnleaf8483
    @autumnleaf8483 2 года назад

    Please assembly tutorials... I wanted to learn it before C++ but I never found any good ones.

  • @Beatsbasteln
    @Beatsbasteln 4 года назад

    why did you not talk about switch cases? i think they are similiar to ifs

  • @karmaindustrie
    @karmaindustrie 5 лет назад +2

    I want to know more about mathematical vs. logical programming!

    • @benw-l7k
      @benw-l7k 5 лет назад

      In computer science, logic is a subset of mathematics.

  • @venkateswarans1012
    @venkateswarans1012 6 лет назад

    Can anyone suggest me good C++ IDE for Linux ... I hate windows 😒😒

  • @viktor_borodin
    @viktor_borodin 3 года назад

    I want assembly videos

  • @GenericPhantom1
    @GenericPhantom1 Год назад

    Condition - If X (something) = True or false then it executes something

  • @ImNotGam
    @ImNotGam Год назад

    You can’t convince me that being able to do 1 line if statements isn’t a bug caused by if else that they left in.