Declare an array of floating point elements called week that can be referenced by using any day of the week as a subscript. Assume Sunday is the first subscript.
I have asked others this before and was told it was impossible. This is the first array I will have ever made and the question is straight out of my textbook. How could this be impossible? Any help is appreciated.
I have seen values added to enums for sizing reason before, but I dislike it for the reason I gave above. It breaks the "encapsulation" of the enum (that all members are valid values of the enum).
You could do something like the following instead?