I'm wondering why this doesn't work when in a struct or class but does ordinarily when declared outside of a struct or class.
enum options { OPTION1, OPTION2};
int main()
{
options opts[] = { OPTION1, OPTION2}; // WORKS
struct DOGG
{
//options opts[] = { OPTION1, OPTION2}; // DOESN'T WORK
options opts2[2] = { OPTION1, OPTION2}; // WORKS
};
}
Why in the class can it not deduce the size? This seems strange to me and would like to understand why this happens.