non-static data member initializers only available with -std=c++11 or -std=gnu++11
[enabled by default]
int Red = 255;
non-static data member initializers only available with -std=c++11 or -std=gnu++11
[enabled by default]
int Green = 255;
non-static data member initializers only available with -std=c++11 or -std=gnu++11
[enabled by default]
int Blue = 255;
不知道为什么这不起作用。
struct color {
int Red = 255;
int Green = 255;
int Blue = 255;
};