ENUMS in every programming language (All you need to know)

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 191

  • @CodeBeauty
    @CodeBeauty  2 роки тому +26

    📚 Learn how to solve problems and build projects with these FREE E-Books ⬇
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.
    Code from this video:
    #include
    using namespace std;
    enum EyeColor {
    Brown=1,
    Blue=22,
    Green=3,
    Gray=4,
    Heterochromia,
    Other
    };
    void getEyeColorDetails(EyeColor myEyeColor) {
    switch (myEyeColor) {
    case Brown: cout

  • @dundyd3612
    @dundyd3612 2 роки тому +18

    I love your videos Saldina, much better than any other I could find

  • @milkamilkica1935
    @milkamilkica1935 2 роки тому +10

    Yess, was waiting for this. Your videos are great!

  • @ChrisVideosGreek
    @ChrisVideosGreek 2 роки тому +13

    This video is gonna be a great one!

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

    Your accent is so understandable and easy to follow. Thanks a million ❤

  • @richardchinomona4676
    @richardchinomona4676 2 роки тому +1

    You are appreciated. I don't think I would be able to passing my C++ module without you.

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

    Amazing video. Didn’t get this concept when explained in college. You made it so much easier to understand.
    EyeColor myEyeColor = (EyeColor) 1;
    If (EyeColor == 1) {likeVideo();}
    Else {likeVideo();}

  • @SergiuMuntean-q5n
    @SergiuMuntean-q5n 9 місяців тому +1

    This video is a masterpiece! Congratulations, Saldina, it helped me a lot!

    • @CodeBeauty
      @CodeBeauty  9 місяців тому

      I'm happy to hear that 🥰

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

    Great job as always Saldina!

  • @gollygobih6527
    @gollygobih6527 2 роки тому +18

    I'm your biggest fan bcz your videos changed my life. I was depressed and couldn't see anything positive and interesting to do with my life until I started watching your videos. now I feel that I'm making progress every day and cant wait for every new video that you publish. love you SALDINA 🌹🌹🌹

    • @CodeBeauty
      @CodeBeauty  2 роки тому +13

      I'm so happy for you and I'm sure that you'll find happiness and purpose in building great apps that will serve people and our planet for a long time to come! ❤️❤️

    • @exinangai2216
      @exinangai2216 2 роки тому +7

      wow, I never thought of prog tut video can help ppl with depression to engage in new activities again. Keep going, pal 😁. If programming & exploring how computers work is your thing, it is a refreshing start to get a taste of "actually living at present" (instead of burying and helplessly struggling with negative thoughts every sec). You may one day become a great programmer among the existing ones. 👍🏻Good Luck & Best wishes to you & your journey of coding. 👍

    • @phoebewell3653
      @phoebewell3653 2 роки тому +6

      I was in a similar situation and mine started with a breakup. I also started learning programming and going to the gym because I WANT A BETTER FUTURE for myself. I feel so much better now than just a few months ago. Now I have a purpose and goals for every day in my life. Thank you Saldina, you have a gift for this, don't ever stop, your videos will change many lives ❤️ ❤️ (ps. I also follow you on IG and love your gym stories)

  • @savansanghavi7465
    @savansanghavi7465 2 роки тому +1

    Your videos are better than whatever is available on UA-cam.
    Thanks for sharing ur knowledge.
    Please make videos about rtti

  • @alec_almartson
    @alec_almartson 2 роки тому +5

    Thank you for making this video,
    I really appreciate it. 💯👍🏻

  • @dandon.3667
    @dandon.3667 11 місяців тому

    You make me understand every concept in c++ , I love you so much I'm so grateful🥰🥰😍😍😍

  • @-_-5070
    @-_-5070 2 роки тому +5

    Thank you Saldina♥️ This was really helpful, and it's 2 btw😁

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

    Hi .. I'm a self taught programmer for embedded hardware .. Feeling playful; my eye colour changes with my mood - 12 today :). I came here to refresh knowledge of Static variables. BYW .. my two fav. teachers are you and David Malan (CS50) .. Thanks much.

  • @Aliqasim2131
    @Aliqasim2131 2 роки тому +7

    Please make full course on Data Structure and algorithm (DSA)

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

    After watching this video I finally could understand the use of enums. Thanks for sharing your knowledge.
    Regards from Brazil.

  • @Maxthebomb_13
    @Maxthebomb_13 3 місяці тому

    the only video i found that actually helped me understand! tysm ♥

  • @4theloveoflife431
    @4theloveoflife431 2 роки тому

    Absolutely great! Your videos are amazing. Enums still give me lots of questionnarks, but you deleted some of them!
    Great Videos!
    Keep it up! :)

  • @krystianratajczyk6751
    @krystianratajczyk6751 Рік тому +1

    You tutorials are vrey helpful, I have learnt from them a lot, Thanks!

  • @malikmuhammadarslan9993
    @malikmuhammadarslan9993 2 роки тому +2

    you are really good in teaching

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

    Thankyou so much! I love your videos, you explain everything so clearly and in a simple fashion. I have learnt so much from you! Thankyou!

  • @l.p.1967
    @l.p.1967 2 роки тому +5

    Thank you for making this video, btw, the question that you asked is 2 😁♥

  • @habeeblaimusa4466
    @habeeblaimusa4466 2 роки тому +2

    I always gain sth. Anytime I watch your video. Thank you Saldina💯💯

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

      getting smarter every day 💪❤️

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

    Thank you CodeBeauty! ❤️👍

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

    Always good content and presentation style. I always learn things from your videos. You've asked about a complete SQL class/series a couple times--yes from me.

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

    tysm for ur videos regarding programming it's helping me and ofc other's alot i'm enjoying alot :)

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

    Always love your teaching styles ❤️❤️❤️❤️❤️❤️❤️

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

    I really enjoy and learn a lot from your videos. Thank you Code beauty.

  • @douglascaskey7302
    @douglascaskey7302 3 місяці тому

    Because I usually use enum class (C++11) to give the enum scope... My eye color is EyeColor::Blue. This is useful where you might want to also use FabricColor::Blue and PaintColor::Blue.
    Also to expand on the value assignment... since the compiler will automatically increment the value of the 1st enum item by 1 you can do things like:
    enum class DialogPosition : signed char {Offset = -7, BottomRight, BottomLeft, Center, TopRight, TopLeft};

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

    1,
    your video has always been so inspiring !

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

    0
    0
    Great video! Thank you very much, Saldina! :)

  • @akosyt4540
    @akosyt4540 2 роки тому +2

    enum EyeColor{
    Brown=0,
    Blue,
    Grey,
    Green,
    Heterochromia};
    int UserIput;
    EyeColor eyecolor;
    do
    {
    cout > UserIput;
    } while (UserIput < 0 || UserIput>4);


    eyecolor = EyeColor( UserIput);
    switch (eyecolor)
    {
    case EyeColor::Brown:cout

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

    Hello dear.
    first answer 0
    second answer 1
    I have a request for you, please do videos in Qt for beginners.
    Your explanation is more easy and understandable to me.
    Thanks in advance

  • @sattorjabborov2728
    @sattorjabborov2728 2 роки тому +1

    I was trying to understand why we need enums in swift language, and I finally understood it from c++😅❤️❤️

    • @CodeBeauty
      @CodeBeauty  2 роки тому +1

      for the same reason

    • @tvrrp
      @tvrrp 2 роки тому +1

      Yep. And enums in Swift are more powerful. For example you can write custom initialisation for enum that take struct as a parameter. And you can iterate throw those structs and assign enum case to itself

  • @tullyal
    @tullyal 2 роки тому +2

    Great video - easily digested over lunch! :-)

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

      you can watch this one without even typing the code and still understand how it all works 😏😁❤️

  • @CSHuang-uw1lx
    @CSHuang-uw1lx 11 місяців тому

    well explaination, but I have a question, which is EyeColor is an Enum type which contains several intergers. But when declaring EyeColor myEyeColor, the myEyeColor is only a member of the EyeColor? how to realize the data structure of enum and its members and values?

  • @rino19ny
    @rino19ny 2 роки тому +2

    hello. please make a tutorial for C++ range based for loop and C++ vectors.

  • @sewingmachinesindetail
    @sewingmachinesindetail 9 місяців тому

    Thank you for nice video.
    In your code I saw myEyeColor++ in a for statement. I have tried to make a statement like myEyeColor++; in code, and then the compiler responds, that it is not allowed, and it surprised me. Should a C++ compiler allow this statement? Could it be allowed in C and not in C++? Is your compiler here C or C++?

  • @mehdipira4933
    @mehdipira4933 2 роки тому +1

    Awesome, thanks.

  • @Youssef0021-7
    @Youssef0021-7 25 днів тому

    great video salvina! thank u

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

    You're awesome girl!!

  • @cac2244
    @cac2244 2 роки тому +1

    Finally an easy to understand explanation... BTW MyEyeColor == 1;

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

    Hallo, it is 2+3.
    Thanks for the effort .

  • @emilyve
    @emilyve 11 місяців тому

    I am 1, i love your character, always watch your videos complete, even the 2,5hour videos, love it

  • @lachichinqkocev6151
    @lachichinqkocev6151 2 роки тому +1

    Hi Saldina I em a student and I studying CPP and I em a big fan of your videos
    can you pls. make video on CPP references pls.

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

    Very good video. ( not only that, but others too )
    My english is 75% equil google translate, but I'll try to get my point across )
    I would like to see a mention that the enum is a global and we cannot create two enums with the same values:
    enum EyeColor {Blue, Green, Grey};
    enum ClothColor {Blue, Red, Green};
    We will get an error stating that two identical values ​​are declared ( or something similar ).
    But at the same time there is an enum class that solves this problem.
    I would also like to know what and where is more often used on large projects ? ( enum or enum class )
    I also heard somewhere that it is correct to write enum values like this:
    enum EyeColor {BLUE, RED, YELLOW};
    because these are constants, but I still don’t understand if someone is still doing this or is already “outdated” ?
    P.s.
    if (Brown == 1) { MyEyeColor = 6; } (Gray + Green)

  • @khan-f5f
    @khan-f5f 2 роки тому

    Hello my question is In this video enums as function parameter you just create a function of geteyeclordetail and define switch cases under it it does't related to enums if we write this function without Enum it will work or not

  • @sanaeareina5371
    @sanaeareina5371 2 місяці тому

    thank uu so much is very usefull ❤❤

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

    Hello... pls post videos on c++ stl.
    Standard template library..
    Your videos are great ..🥳

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

    My eye color is 5 which is mix of 1 & 2 & 3

    • @CodeBeauty
      @CodeBeauty  2 роки тому +1

      wish I was that cool 👀🥰

  • @admoonhermiz1
    @admoonhermiz1 2 роки тому +1

    thank you!!!

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

    I just love this one~!

  • @yazidfarid7788
    @yazidfarid7788 Місяць тому

    Thank you ❤

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

    Dear Saldana is it possible to define any number of enum and use it? For example say Group - 1 { English, Tamil, Literature etc}, Group - 2 {Math, Physics,Chemistry etc}

  • @menaadel-j9e
    @menaadel-j9e Рік тому

    i love your explanation , iam from Egypt😍😜

  • @Timo-Epis
    @Timo-Epis Рік тому

    isn't "enum class" more appropiate to use?

  • @blacksky9571
    @blacksky9571 2 роки тому +2

    I cannot find the translation

  • @khaledvevo603
    @khaledvevo603 10 місяців тому

    Thank You So Much

  • @colins2
    @colins2 2 роки тому +1

    Quite a lot of blue-eyed programmers - me too!
    Why didn't you mention a default value in the switch statements? I always thought that you should, where there could be ambiguity.
    Great video though👍

  • @СтоянТодоров-л9э

    EyeColor myEycolor = (EyeColor) 6; Although I'm not sure if cast will work with Rvalue.

  • @MostorAstrakan
    @MostorAstrakan 2 роки тому +2

    4.
    I've never found much use for enums, to be honest. Your example is for user interaction, but a user is never going to look up their eye color in a table and then enter a number. (It's an example, so fine). I think the main use for an enum is to make numerical codes more readable for the Programmer. For instance if you have a list of increasingly important messages, you could do:
    enum Severity {
    ignore=0,
    debug,
    info,
    warning,
    error,
    panic,
    disaster
    };
    And then you can do things like:
    if(errorLevel >= error) {
    cout

    • @davidmorris2848
      @davidmorris2848 Рік тому +1

      In the video she says that enums are for the programmer and future programmers who look at the code. I don't recall her stating that they were for the user.

  • @antonnovo695
    @antonnovo695 2 роки тому +1

    Hi! You should do a java course. I'd devour it.

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

    Thanks

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

    can you make video for Qt for mac os

  • @ROYALNIL_SITE
    @ROYALNIL_SITE 3 місяці тому

    thanks great master .

  • @Youssef0021-7
    @Youssef0021-7 25 днів тому

    7:43
    my eye color is 0 : )
    thanks for the nice video!

  • @barimahyaw5446
    @barimahyaw5446 2 роки тому +2

    Can saldina create a platform like discord where we can ask questions

    • @CodeBeauty
      @CodeBeauty  2 роки тому +2

      yess, that will be soon 💜 🙈

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

      Okay you've really helped me alot and I'm looking forward to it

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

    Thank you beuty

  • @kenopedia7023
    @kenopedia7023 Рік тому +1

    I learned a lot of for your videos. Hope I will pass the exams😂😂

    • @CodeBeauty
      @CodeBeauty  Рік тому +1

      Good luck 🤞🤞🤗

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

      @@CodeBeauty I have a request. Please explain checksum c++ .

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

      @@CodeBeauty And also the different function of strings function.

  • @rcookman
    @rcookman 2 роки тому +1

    I have brown eyes too. Lovely brown eyes like yours :) Also enums are great thanks for sharing.

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

    My Eye color is 1 😃
    thanks for the video

  • @deneristargerian6755
    @deneristargerian6755 2 роки тому +2

    mine is 1 😁😁

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

    Can you please make videos on microcontroller programming
    For beginners
    If yes please reply so we will wait otherwise you understand 😃😊

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

    take my follow also 1 is mine!

  • @AbleBrawa
    @AbleBrawa 3 місяці тому

    Functions✅️
    Enumeration ✅️
    Union ☑️🙏🙏
    Please, one video about Union

    • @CodeBeauty
      @CodeBeauty  3 місяці тому +1

      thanks for the idea :)

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

    as of 8:05
    My eye color is ...
    Eyecolor myEyeColor = Other;
    std::cout

  • @neepunpatil5201
    @neepunpatil5201 2 роки тому +2

    Well we are close to 200k😄😄

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

    hello can you help me Im trying to make a code that will decode numbers and this is what I have so far im getting errors and im not sure why
    #include
    using namespace std;
    int main()
    {
    int 1, 2, 3, 4, 5,;
    cout > 1 >> 2 >> 3 >> 4 >> 5;
    cout

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

    Very Helpful.
    2

  • @ScaerieTale
    @ScaerieTale 10 місяців тому +1

    5 (2 && 1)

  • @osamahukel8858
    @osamahukel8858 2 роки тому +1

    I am really so grateful for Allah then you .
    Because you really help me in c++ .
    A lot.

  • @chiyang3749
    @chiyang3749 4 місяці тому

    you have so many subscribers, how did you get the time to read the comments posted by them? i mean you probably get thousands of comments every day

    • @CodeBeauty
      @CodeBeauty  4 місяці тому

      i do, but this is my community, these are the people that are learning from my videos so i'm trying as much as possible to make time for them :)

  • @Selinzik_CEO
    @Selinzik_CEO 7 місяців тому

    5...

  • @shukurullomeliboyev2004
    @shukurullomeliboyev2004 Рік тому +1

    my eyes are blue -gray😁.

  • @us07251
    @us07251 2 роки тому +1

    ERROR: My eye color is black :(

  • @ethangold4900
    @ethangold4900 2 роки тому +1

    As a computer science student, I realized the importance of enums when I revisited one of my projects after months

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

    int userInput;
    do {
    coutuserInput;
    }while (userInput6);

  • @heltondeoliveirarodrigues5726
    @heltondeoliveirarodrigues5726 9 місяців тому +1

    EyeColor=1

  • @jeetenzhurlollz8387
    @jeetenzhurlollz8387 9 місяців тому

    she made unreal easy

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

    Did you know i never used; or very rare;
    Instead I used const binary arrray

  • @Timo-Epis
    @Timo-Epis Рік тому

    Everyone seems to have their own way formating enumerators lol

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

    My eye color is 1.
    By show of hands or thumbs up, who else likes the way our hostess says "parameter"?

  • @Austin-pw2ud
    @Austin-pw2ud 2 роки тому

    Gooodddddd,,,,,how is she sooo cute and Smart at the same time!!!!

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

    My eye color: 1 ^^

  • @MsSemki
    @MsSemki 8 місяців тому +1

    4

  • @samyaza5752
    @samyaza5752 2 роки тому +1

    3

  • @likami6830
    @likami6830 2 роки тому +1

    My eye color is 2 :)))

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

    my eye==1

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

    Green