C++ Programming Tutorial 43 - Creating a Menu

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • Start your software dev career - calcur.tech/de... 💯 FREE Courses (100+ hours) - calcur.tech/al...
    🐍 Python Course - calcur.tech/py...
    ✅ Data Structures & Algorithms - calcur.tech/ds...
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    ✉️ Newsletter - calcur.tech/ne...
    📸 Instagram - / calebcurry
    🐦 Twitter - / calebcurry
    🔗 LinkedIn - / calebcurry
    ▶️ Subscribe - calcur.tech/sub...
    👨🏻‍🎓 Courses - www.codebreakt...
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    ↪ My Amazon Store - www.amazon.com...
    🅿 Patreon - calcur.tech/pat...
    🅖 GitHub Sponsors - github.com/spo...
    Ⓟ Paypal - paypal.me/calcur
    🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
    🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
    📈 Buy Bitcoin - calcur.tech/cr...
    Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/cr...

КОМЕНТАРІ • 68

  • @askjake2426
    @askjake2426 2 роки тому +3

    You saved my college with this. I was feeling overwhelmed and didn't understand how to make a menu for some reason. You seriously just helped me out so much. Thank you for this video.

  • @UCkFvZiCmKQ34UOsW8pJ4TDg
    @UCkFvZiCmKQ34UOsW8pJ4TDg Рік тому +3

    This is so good.
    I'm doing an assignment right now, and this is exactly what I've been searching for all day.

  • @joelt7869
    @joelt7869 5 років тому +41

    Keep it up, some people really enjoy how many episodes you post

    • @foxingeverything6100
      @foxingeverything6100 4 роки тому +2

      true

    • @liamchristian2661
      @liamchristian2661 3 роки тому

      Sorry to be so off topic but does any of you know of a trick to log back into an Instagram account??
      I was stupid lost the password. I would appreciate any tips you can give me

    • @juanjedidiah5250
      @juanjedidiah5250 3 роки тому

      @Liam Christian Instablaster =)

    • @liamchristian2661
      @liamchristian2661 3 роки тому

      @Juan Jedidiah thanks for your reply. I got to the site on google and Im trying it out now.
      Seems to take quite some time so I will get back to you later when my account password hopefully is recovered.

    • @liamchristian2661
      @liamchristian2661 3 роки тому

      @Juan Jedidiah It worked and I finally got access to my account again. Im so happy:D
      Thank you so much, you saved my ass!

  • @FM1234
    @FM1234 Рік тому +2

    It's funny because professors just say make a menu and it's so easy. I didn't have a very good idea of what they were talking about, just knew I had to use a switch. Ty bro

  • @michealdosty3881
    @michealdosty3881 4 роки тому +8

    You really made my day, thanks man. Keep on with your good work

  • @ThaColonel
    @ThaColonel 2 роки тому

    you explained this so much better and in more detail than my professor did! thank you !!!

  • @PunmasterSTP
    @PunmasterSTP 3 роки тому +1

    Men, u really went all-out on this tutorial! Thanks again so much for making it.

  • @REktSigMa
    @REktSigMa Рік тому

    Why does everyone start their main function to return a int? Like don't be the same as everyone else, why not start off with a class Main() with a void main() and make it describe something.

  • @laureven
    @laureven 3 роки тому

    Question... how much this will slow down the code if after ":" inside CASE statement I use scope brackets. Example: case 1: {insideFunction1 (); insideFunction2 (); insideFunction3 (); break;}... will this necessary addition significantly affect the code??

  • @MineCraft-sb3zz
    @MineCraft-sb3zz 4 роки тому +2

    So, how do I put the game in this code?

  • @Pranav0443
    @Pranav0443 3 роки тому

    What's the point of using a do while loop here? You can just a while(true) and it will do the same thing. You are returning when the choice is 0 anyways so there's no point in using choice != 0.
    #include
    #include
    int main()
    {
    srand(time(NULL));
    int choice = 0;
    while (true)
    {
    std::cout

  • @dylan1160
    @dylan1160 2 роки тому

    when I hit enter the console window closes. How do I do multiple inputs?

    • @christiancarter255
      @christiancarter255 2 роки тому

      To keep the console window from closing, you could put at the top:
      #include
      and put in the body:
      system("pause");
      To do multiple inputs, modify the std::cin code some with:
      std::cin >> choice >> another_choice >> yet_another_choice;

  • @PeterVanHertum
    @PeterVanHertum 4 роки тому

    I think the choice==0 condition will never be reached because of the return 0; in case of 0 , so it might as well be a while(true) or a do...while(true) or you have to remove the return 0;

    • @spicyshizz2850
      @spicyshizz2850 2 роки тому

      The condition was choice != 0, which means does not equal

  • @ylllatifaj7907
    @ylllatifaj7907 3 роки тому

    I love the tutorial but do we need an else statement if the input is 2, 3... because in that case the game is going to run the same way as typing 1 as an input

  • @tridipbarman09
    @tridipbarman09 4 роки тому +1

    Hey!! Could you send me a link to a website which gives me the function of symbols used in pairs like !=, == , etc.

  • @vicyoslinuxofficial2607
    @vicyoslinuxofficial2607 4 роки тому +2

    Could you please tell me what's the name of this Visual Studio Code Theme? Thank you so much.

    • @biswind3130
      @biswind3130 3 роки тому +1

      I don't think this is Visual Studio.

    • @thatgurkangurk
      @thatgurkangurk 3 роки тому +1

      @@biswind3130 It is Visual Studio Code, but i don't know that the theme is

    • @PunmasterSTP
      @PunmasterSTP 3 роки тому

      It’s not Embarcadero; that’s all I know…

  • @44mod
    @44mod 5 років тому +1

    I am new to c++ but the one thing i noticed is you use the std:: before cin, cout and the older videos other people use do not. Is that something new in the newer versions of c++.

    • @joabpersijn1222
      @joabpersijn1222 5 років тому +3

      Earlier in the series he explains that you have to declare the namespace before using cout, cin, endl, and other like that.
      Most people will use:
      using namespace std;
      which will declare std for cout, cin, and endl.
      Or you can be more specific such as:
      using std::cout;
      Which will mean you dont have to use the std:: prefix for cout.
      Hope this helps.

    • @antonioshelton3084
      @antonioshelton3084 4 роки тому +1

      @EJAZ Hussain you can now declare each by stating, using std::cout; using std::cin; using std::endl; at the beginning of your program

  • @guitarhax7412
    @guitarhax7412 5 років тому +7

    And a boom once again

    • @codebreakthrough
      @codebreakthrough  5 років тому +4

      This is the best commentary!!

    • @guitarhax7412
      @guitarhax7412 5 років тому +1

      @@codebreakthrough Question. You going to do a python series like this one but where.. maybe you intro ctypes into it somewhere?

    • @PunmasterSTP
      @PunmasterSTP 3 роки тому

      @Giovanni Moscato W h a t ?

    • @PunmasterSTP
      @PunmasterSTP 3 роки тому

      @@codebreakthrough And there better be one on every vid for the rest of the playlist!

  • @alexxlucero_
    @alexxlucero_ 4 роки тому +3

    do you have a video on this for C programming?

    • @aceanimations3214
      @aceanimations3214 3 роки тому +2

      I know this was 11 months ago, but…
      I need this.

    • @PunmasterSTP
      @PunmasterSTP 3 роки тому

      Did you check out Caleb’s C tutorial?
      ua-cam.com/play/PL_c9BZzLwBRKKqOc9TJz1pP0ASrxLMtp2.html

  • @aroojfatima5375
    @aroojfatima5375 3 роки тому +1

    impressive! keep it up Man..!!

  • @NotEvac
    @NotEvac 4 роки тому +6

    why you sound like your crying

    • @silvertakana3932
      @silvertakana3932 3 роки тому

      he is so moving because we have grown up and able to build our first app. he is such a good teacher.

  • @maxc9432
    @maxc9432 3 роки тому +1

    what if your user input non-integer

    • @thatgurkangurk
      @thatgurkangurk 3 роки тому +1

      it just does the first thing, but how do you check

  • @bobDotJS
    @bobDotJS 3 роки тому

    I've been learning C++ for a while now. I'm a full stack JavaScript developer by trade but I'm working to be well rounded.
    First off, I've yet to see anything other than a console application. I switched from Windows to Mac OS when the M1 Macs came out. Visual studio on Mac OS doesn't support C++ development and I'm not going to waste my time learning xcode because I don't plan on using it for anything else. At least Visual Studio on Windows has visual C++ as an option.
    So where do we go from there? When and how do we start building guis?

  • @FrostGamingHype
    @FrostGamingHype 3 роки тому

    can u teach me how to make a Install menu and a Graph in c++ 3D graph's and like a gameengine

  • @god-of-creation6040
    @god-of-creation6040 Рік тому

    how do you pass in a function there

  • @presL05
    @presL05 3 роки тому +1

    thanks for the help dude

  • @themysticblue1331
    @themysticblue1331 4 роки тому +1

    THANK YOU!

  • @mds6387
    @mds6387 5 років тому +2

    Why not use a switch function for the cases?

    • @gergelybrunda
      @gergelybrunda 2 роки тому

      why not use simple if else form...

    • @mds6387
      @mds6387 2 роки тому

      @@gergelybrunda if else. if and if. If or else. That was my point.

  • @Asimaro
    @Asimaro 3 роки тому +1

    dude u r really good but idk how to say that
    u r doing a lot of things like u dont know c++
    i mean like where is
    using namespace std;
    after add this u dont need to use
    std::
    again

    • @jung-zen
      @jung-zen 3 роки тому +1

      There are more complex disadvantages to using namespace std, so it's not wise to encourage beginners to use this

    • @Asimaro
      @Asimaro 3 роки тому +1

      @@jung-zen
      oh then y in university they learn us to use std ?
      and give me an example about the disadvantages please

    • @jung-zen
      @jung-zen 3 роки тому +2

      @@Asimaro
      I’m just a beginner myself, in uni learning c++ .Can’t say I’m confidently sure why. However, it seems to be worth looking into. My lecturers have mentioned it briefly (they don’t use it) and its often referred to as ‘bad practice’, everywhere from UA-cam to a variety of forums.
      From what I gather, not using namespace is more relevant when building higher level, more complex programs. As opposed to smaller, beginner/intermediate programs which are easier to maintain and fix.

    • @Asimaro
      @Asimaro 3 роки тому +1

      @@jung-zen
      thanks to say that man i will check all that

    • @kingofthegames7179
      @kingofthegames7179 2 роки тому

      @@Asimaro It's because of things potentially having the same name, i think he explained it in an earlier video
      like for example if I include two different libraries, what if one of the libraries has something named the exact same as the other?
      by doing std::cout

  • @sydguitar99
    @sydguitar99 4 роки тому +2

    Why don't you use namespace std;?

    • @airforcedude08
      @airforcedude08 4 роки тому +1

      Some are taught that using namespace std is a bad coding standard. It's usually company-specific from what I've been told.

    • @c0smo709
      @c0smo709 4 роки тому +1

      It's ew

  • @lev1617
    @lev1617 2 роки тому

    Im your 1,000th like lets goo!!

  • @c0smo709
    @c0smo709 4 роки тому +15

    0/10 no Indian accent

  • @DataStorm1
    @DataStorm1 5 років тому +1

    sheez, unsubbed, too much feedbombing.

  • @ihateyou8006
    @ihateyou8006 4 роки тому +1

    im working with a template, i found on github. how do i access the menu?