#include enum Day {sunday = 0, monday = 1, tuesday = 2, wednesday = 3, thursday = 4, friday = 5, saturday = 6}; int main () { // enums = a user-defined data type that consists // of paired named-integer constants. // GREAT if you have a set of potential options Day today = friday; switch(today){ case sunday: std::cout
Although the point of this exercise is to use enums, here a swtich epressions is why I love them. Enums can be difficult to iterate though, and maybe getting the sizeof(Enum) might work in C++, in C# it gets a little advanced.
//program to display planet's info using enumeration(enums) in c++ # include using namespace std; enum planets { Mercury,Venus,Earth,Mars, Jupiter,Saturn,Uranus,Neptune }; int main() { planets planet=Mercury; switch(planet) { case Mercury: cout
#include enum player {Messi, Ronaldo, Neymar, Ronaldinho, Suarez, Stoichkov}; int main() { player best = Ronaldinho; switch(best){ case Messi: std::cout
#include
enum Day {sunday = 0, monday = 1, tuesday = 2, wednesday = 3,
thursday = 4, friday = 5, saturday = 6};
int main () {
// enums = a user-defined data type that consists
// of paired named-integer constants.
// GREAT if you have a set of potential options
Day today = friday;
switch(today){
case sunday: std::cout
Thank you for this very useful video!
Is possible to create an enum variable with variables inside? Like a dynamic enum!
Thank you!
F
Oh my, visited this channel after a while and so much new content to watch!
GREAT!
thanks you so much for the lecture 💜 eagerly waiting for oop leacture :)
Although the point of this exercise is to use enums, here a swtich epressions is why I love them.
Enums can be difficult to iterate though, and maybe getting the sizeof(Enum) might work in C++, in C# it gets a little advanced.
have one doubt, how to use enums in arithmetic operations?
enum SheSaid {big = 7, small = 6, thin = 1, skinny = 0, oh-no = 10, get-out-of-here = 100};
//program to display planet's info using enumeration(enums) in c++
# include
using namespace std;
enum planets
{
Mercury,Venus,Earth,Mars,
Jupiter,Saturn,Uranus,Neptune
};
int main()
{
planets planet=Mercury;
switch(planet)
{
case Mercury: cout
enum Variables{integer, boolean}; Other variables didn't work
#include
enum player {Messi, Ronaldo, Neymar, Ronaldinho, Suarez, Stoichkov};
int main() {
player best = Ronaldinho;
switch(best){
case Messi: std::cout
Bro please say my name in next video
😂
😂