C++ switch structure

Поделиться
HTML-код
  • Опубликовано: 12 окт 2015
  • This tutorial is for beginners. It helps the learner understand the basics of a switch structure in c++.
  • ХоббиХобби

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

  • @navnav1819
    @navnav1819 Год назад +14

    Quick and to the point just how it should be! You are a great teacher! 🙂

    • @HeidiGentryKolen
      @HeidiGentryKolen  7 месяцев назад +2

      Thank you!

    • @Staromania7
      @Staromania7 6 месяцев назад +2

      ​@@HeidiGentryKolen8 year ago posted but video is still helping people in 2023 appreciated.

  • @leenasem6613
    @leenasem6613 3 месяца назад +2

    thank you, it really helped me while writing my program.

  • @Knucklebreakingnate-xw3pc
    @Knucklebreakingnate-xw3pc 3 года назад +5

    Thank you! So much easier than my textbook explained it!

  • @leenasem6613
    @leenasem6613 3 месяца назад +2

    you could use using namespace std; instead of std: : cout/cin

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

    Very upfront thanks. And your voice is soothing and nice to listen and learn from

  • @Entertainment14336
    @Entertainment14336 14 дней назад

    initial step onwards related to compiler and mac also that is terminal

  • @benaside
    @benaside 8 лет назад

    These videos are so helpful!

  • @jeromeectana7701
    @jeromeectana7701 8 дней назад

    What happened when you doble the number?is it invalid?

  • @Entertainment14336
    @Entertainment14336 13 дней назад

    im new to mac device can you give step to execute from first..

  • @Entertainment14336
    @Entertainment14336 14 дней назад

    can you show from starting onwards please i need this

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

    does a if isnt enough?

  • @ImranKhan-ur7gv
    @ImranKhan-ur7gv 8 лет назад

    Good job

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

    Thank you

  • @Entertainment14336
    @Entertainment14336 14 дней назад

    step show please while initial step

  • @rayhey-wx5tz
    @rayhey-wx5tz Год назад +2

    How do we loop this and go back to the question being asked again after "wrong data entered"?
    Would be cool if you can write the code here ;D

    • @hunteracc4
      @hunteracc4 9 месяцев назад +1

      A switch itself can only select a certain case and execute it. The flow of control cannot go back up due to it. Try wrapping the switch within a loop.

    • @edwardjrnalog1662
      @edwardjrnalog1662 2 месяца назад

      ​@@hunteracc4how exactly

    • @hunteracc4
      @hunteracc4 2 месяца назад

      @@edwardjrnalog1662
      #include
      #include
      int main() {
      char choice;
      bool isRepeating = true;
      while (isRepeating) {
      cout > choice;
      switch (choice) {
      case '1':
      cout