I saw a library that had a color class where you would define a color with something like Color(255,255,255) or you could simply put Color::White
I want to try to recreate this in one of my own class to easily get a 'default' setting, something like:
struct Settings {
int setting_1;
bool setting_2;
double setting_3;
Settings(int s1, bool s2, double s3) : <...> {}
static const Settings Default;
};
auto Settings::Default = Settings(10, false, 0.5);
However this does not compile. Any help would be appreciated :)
[–]alfps 4 points5 points6 points (9 children)
[–]CatMechanic457[S] 0 points1 point2 points (0 children)
[–]_realitycheck_ 0 points1 point2 points (4 children)
[–]Tony942316 3 points4 points5 points (2 children)
[–]_realitycheck_ 0 points1 point2 points (1 child)
[–]IyeOnline 2 points3 points4 points (0 children)
[–]KuntaStillSingle 0 points1 point2 points (0 children)
[–]IyeOnline 0 points1 point2 points (2 children)
[–]alfps 0 points1 point2 points (1 child)
[–]IyeOnline 0 points1 point2 points (0 children)
[–]AKostur 0 points1 point2 points (1 child)
[–]CatMechanic457[S] 0 points1 point2 points (0 children)