ENUMS in C++

preview_player
Показать описание

In this video we're going to take a look at what enums are in C++. Enum is short for enumeration, which is a set of named values. We can use these instead of normal integer variables to keep our code a little more organised.

Рекомендации по теме
Комментарии
Автор

Some of the best videos are made just after sleep.

deepakprakash
Автор

this guy is one of those 5% of youtubers who actually deserve a patreon. he puts in effort to make C++ hell feel like barbeque grill.

bobas
Автор

hands down the best programming channel on youtube, fast straight to the point thank you!

ashiinsane
Автор

I discovered enum classes the other day, and I was so happy. Classic enums are kind of annoying when they leak into the current namespace.

Plasticcaz
Автор

Finally! A straight to the point explanation of enum! Subscribed!

Ranakade
Автор

Cherno after waking up...
"lets make a video on C++"

aquibshaikh
Автор

I recently started watching your channel, even though I'm subscribed long time ago. It's amazing how your videos are elucidating even if you don't even to struggle doing it. Cheers!

Tupiniviking_de_osasco
Автор

Very educational, you are a fantastic teacher Cherno. Waiting for the OpenGL series! Thank you so much for making these

casvanmarcel
Автор

Great videos, this was my second time watching your static compilation and it made complete sense.

bigmamatristana
Автор

It would be awesome to have an updated version of this coving enum class as you mentioned, but also addressing the pesky issue in C++ enumerated regarding serialization and mapping to string names. (E.g. there’s a use-case for having ascii serialized assets which have enum values serialized as string names). Use of enum as bitfields (flags) is also another useful side topic. Thanks Cherno!

foomoo
Автор

i started learning c++ this year, and i really thank you, your videos helped a-lot , and please continue to keep adding new videos

subhamprasad
Автор

One more excellent tutorial. This series are just perfect for anyone that wants to learn C++. Thank you :P

krec
Автор

*My takeaways:*
ENUMS is a way to name values 0:34

leixun
Автор

One of my favorite usages of Enums is as a function template parameter, with constexpr if statements if i need a function to do something *slightly* different depending on some options. It eliminates a lot of conditional instructions from compiled code while cutting down on duplicate written code.

master_spike
Автор

Damn, Thank you! Your vids are short, fast, and to the point. Thank you again keep up the good work!

gabrielrosewood
Автор

Great tutorials man, thanks! And the hair too, love it 😂

DashwoodIce
Автор

Actually you can avoid the confusion with distingiushing the two "Error" like Log::Level::Error

zsdanix
Автор

Thank you so much. My 122 professor started glossing over enums with operator overloading, assuming we already knew them, when my 121 teacher never taught them

-TheBugLord
Автор

Man these are soo useful, i love this series

batabatonica
Автор

@TheChernoProject, big thank you for the videos, learning a lot more than i ever have with c++ :)

Steve-giyj