The answer was found by user @Niall. I simply forgot to add #pragma once at the top of my Color3.h
#pragma once
class Color3{
public:
Color3();
Color3(const float red, const float green, const float blue);
float getRed() const;
float getGreen() const;
float getBlue() const;
/*
Preset Colors
*/
static const Color3 Aliceblue;
static const Color3 Antiquewhite;
static const Color3 Aqua;
static const Color3 Aquamarine;
static const Color3 Azure;
static const Color3 Beige;
static const Color3 Bisque;
static const Color3 Black;
static const Color3 Blanchedalmond;
static const Color3 Blue;
static const Color3 Blueviolet;
static const Color3 Brown;
static const Color3 Burlywood;
static const Color3 Cadetblue;
static const Color3 Chartreuse;
static const Color3 Chocolate;
static const Color3 Coral;
static const Color3 Cornflowerblue;
static const Color3 Cornsilk;
static const Color3 Crimson;
static const Color3 Cyan;
static const Color3 Darkblue;
static const Color3 Darkcyan;
static const Color3 Darkgoldenrod;
static const Color3 Darkgray;
static const Color3 Darkgreen;
static const Color3 Darkgrey;
static const Color3 Darkkhaki;
static const Color3 Darkmagenta;
static const Color3 Darkolivegreen;
static const Color3 Darkorange;
static const Color3 Darkorchid;
static const Color3 Darkred;
static const Color3 Darksalmon;
static const Color3 Darkseagreen;
static const Color3 Darkslateblue;
static const Color3 Darkslategray;
static const Color3 Darkslategrey;
static const Color3 Darkturquoise;
static const Color3 Darkviolet;
static const Color3 Deeppink;
static const Color3 Deepskyblue;
static const Color3 Dimgray;
static const Color3 Dimgrey;
static const Color3 Dodgerblue;
static const Color3 Firebrick;
static const Color3 Floralwhite;
static const Color3 Forestgreen;
static const Color3 Fuchsia;
static const Color3 Gainsboro;
static const Color3 Ghostwhite;
static const Color3 Gold;
static const Color3 Goldenrod;
static const Color3 Gray;
static const Color3 Green;
static const Color3 Greenyellow;
static const Color3 Grey;
static const Color3 Honeydew;
static const Color3 Hotpink;
static const Color3 Indianred;
static const Color3 Indigo;
static const Color3 Ivory;
static const Color3 Khaki;
static const Color3 Lavender;
static const Color3 Lavenderblush;
static const Color3 Lawngreen;
static const Color3 Lemonchiffon;
static const Color3 Lightblue;
static const Color3 Lightcoral;
static const Color3 Lightcyan;
static const Color3 Lightgoldenrodyellow;
static const Color3 Lightgray;
static const Color3 Lightgreen;
static const Color3 Lightgrey;
static const Color3 Lightpink;
static const Color3 Lightsalmon;
static const Color3 Lightseagreen;
static const Color3 Lightskyblue;
static const Color3 Lightslategray;
static const Color3 Lightslategrey;
static const Color3 Lightsteelblue;
static const Color3 Lightyellow;
static const Color3 Lime;
static const Color3 Limegreen;
static const Color3 Linen;
static const Color3 Magenta;
static const Color3 Maroon;
static const Color3 Mediumaquamarine;
static const Color3 Mediumblue;
static const Color3 Mediumorchid;
static const Color3 Mediumpurple;
static const Color3 Mediumseagreen;
static const Color3 Mediumslateblue;
static const Color3 Mediumspringgreen;
static const Color3 Mediumturquoise;
static const Color3 Mediumvioletred;
static const Color3 Midnightblue;
static const Color3 Mintcream;
static const Color3 Mistyrose;
static const Color3 Moccasin;
static const Color3 Navajowhite;
static const Color3 Navy;
static const Color3 Oldlace;
static const Color3 Olive;
static const Color3 Olivedrab;
static const Color3 Orange;
static const Color3 Orangered;
static const Color3 Orchid;
static const Color3 Palegoldenrod;
static const Color3 Palegreen;
static const Color3 Paleturquoise;
static const Color3 Palevioletred;
static const Color3 Papayawhip;
static const Color3 Peachpuff;
static const Color3 Peru;
static const Color3 Pink;
static const Color3 Plum;
static const Color3 Powderblue;
static const Color3 Purple;
static const Color3 Red;
static const Color3 Rosybrown;
static const Color3 Royalblue;
static const Color3 Saddlebrown;
static const Color3 Salmon;
static const Color3 Sandybrown;
static const Color3 Seagreen;
static const Color3 Seashell;
static const Color3 Sienna;
static const Color3 Silver;
static const Color3 Skyblue;
static const Color3 Slateblue;
static const Color3 Slategray;
static const Color3 Slategrey;
static const Color3 Snow;
static const Color3 Springgreen;
static const Color3 Steelblue;
static const Color3 Tan;
static const Color3 Teal;
static const Color3 Thistle;
static const Color3 Tomato;
static const Color3 Turquoise;
static const Color3 Violet;
static const Color3 Wheat;
static const Color3 White;
static const Color3 Whitesmoke;
static const Color3 Yellow;
static const Color3 Yellowgreen;
private:
float red;
float green;
float blue;
};
const Color3 Color3::Aliceblue(0.941f, 0.973f, 1.000f);
const Color3 Color3::Antiquewhite(0.980f, 0.922f, 0.843f);
const Color3 Color3::Aqua(0.000f, 1.000f, 1.000f);
const Color3 Color3::Aquamarine(0.498f, 1.000f, 0.831f);
const Color3 Color3::Azure(0.941f, 1.000f, 1.000f);
const Color3 Color3::Beige(0.961f, 0.961f, 0.863f);
const Color3 Color3::Bisque(1.000f, 0.894f, 0.769f);
const Color3 Color3::Black(0.000f, 0.000f, 0.000f);
const Color3 Color3::Blanchedalmond(1.000f, 0.922f, 0.804f);
const Color3 Color3::Blue(0.000f, 0.000f, 1.000f);
const Color3 Color3::Blueviolet(0.541f, 0.169f, 0.886f);
const Color3 Color3::Brown(0.647f, 0.165f, 0.165f);
const Color3 Color3::Burlywood(0.871f, 0.722f, 0.529f);
const Color3 Color3::Cadetblue(0.373f, 0.620f, 0.627f);
const Color3 Color3::Chartreuse(0.498f, 1.000f, 0.000f);
const Color3 Color3::Chocolate(0.824f, 0.412f, 0.118f);
const Color3 Color3::Coral(1.000f, 0.498f, 0.314f);
const Color3 Color3::Cornflowerblue(0.392f, 0.584f, 0.929f);
const Color3 Color3::Cornsilk(1.000f, 0.973f, 0.863f);
const Color3 Color3::Crimson(0.863f, 0.078f, 0.235f);
const Color3 Color3::Cyan(0.000f, 1.000f, 1.000f);
const Color3 Color3::Darkblue(0.000f, 0.000f, 0.545f);
const Color3 Color3::Darkcyan(0.000f, 0.545f, 0.545f);
const Color3 Color3::Darkgoldenrod(0.722f, 0.525f, 0.043f);
const Color3 Color3::Darkgray(0.663f, 0.663f, 0.663f);
const Color3 Color3::Darkgreen(0.000f, 0.392f, 0.000f);
const Color3 Color3::Darkgrey(0.663f, 0.663f, 0.663f);
const Color3 Color3::Darkkhaki(0.741f, 0.718f, 0.420f);
const Color3 Color3::Darkmagenta(0.545f, 0.000f, 0.545f);
const Color3 Color3::Darkolivegreen(0.333f, 0.420f, 0.184f);
const Color3 Color3::Darkorange(1.000f, 0.549f, 0.000f);
const Color3 Color3::Darkorchid(0.600f, 0.196f, 0.800f);
const Color3 Color3::Darkred(0.545f, 0.000f, 0.000f);
const Color3 Color3::Darksalmon(0.914f, 0.588f, 0.478f);
const Color3 Color3::Darkseagreen(0.561f, 0.737f, 0.561f);
const Color3 Color3::Darkslateblue(0.282f, 0.239f, 0.545f);
const Color3 Color3::Darkslategray(0.184f, 0.310f, 0.310f);
const Color3 Color3::Darkslategrey(0.184f, 0.310f, 0.310f);
const Color3 Color3::Darkturquoise(0.000f, 0.808f, 0.820f);
const Color3 Color3::Darkviolet(0.580f, 0.000f, 0.827f);
const Color3 Color3::Deeppink(1.000f, 0.078f, 0.576f);
const Color3 Color3::Deepskyblue(0.000f, 0.749f, 1.000f);
const Color3 Color3::Dimgray(0.412f, 0.412f, 0.412f);
const Color3 Color3::Dimgrey(0.412f, 0.412f, 0.412f);
const Color3 Color3::Dodgerblue(0.118f, 0.565f, 1.000f);
const Color3 Color3::Firebrick(0.698f, 0.133f, 0.133f);
const Color3 Color3::Floralwhite(1.000f, 0.980f, 0.941f);
const Color3 Color3::Forestgreen(0.133f, 0.545f, 0.133f);
const Color3 Color3::Fuchsia(1.000f, 0.000f, 1.000f);
const Color3 Color3::Gainsboro(0.863f, 0.863f, 0.863f);
const Color3 Color3::Ghostwhite(0.973f, 0.973f, 1.000f);
const Color3 Color3::Gold(1.000f, 0.843f, 0.000f);
const Color3 Color3::Goldenrod(0.855f, 0.647f, 0.125f);
const Color3 Color3::Gray(0.502f, 0.502f, 0.502f);
const Color3 Color3::Green(0.000f, 0.502f, 0.000f);
const Color3 Color3::Greenyellow(0.678f, 1.000f, 0.184f);
const Color3 Color3::Grey(0.502f, 0.502f, 0.502f);
const Color3 Color3::Honeydew(0.941f, 1.000f, 0.941f);
const Color3 Color3::Hotpink(1.000f, 0.412f, 0.706f);
const Color3 Color3::Indianred(0.804f, 0.361f, 0.361f);
const Color3 Color3::Indigo(0.294f, 0.000f, 0.510f);
const Color3 Color3::Ivory(1.000f, 1.000f, 0.941f);
const Color3 Color3::Khaki(0.941f, 0.902f, 0.549f);
const Color3 Color3::Lavender(0.902f, 0.902f, 0.980f);
const Color3 Color3::Lavenderblush(1.000f, 0.941f, 0.961f);
const Color3 Color3::Lawngreen(0.486f, 0.988f, 0.000f);
const Color3 Color3::Lemonchiffon(1.000f, 0.980f, 0.804f);
const Color3 Color3::Lightblue(0.678f, 0.847f, 0.902f);
const Color3 Color3::Lightcoral(0.941f, 0.502f, 0.502f);
const Color3 Color3::Lightcyan(0.878f, 1.000f, 1.000f);
const Color3 Color3::Lightgoldenrodyellow(0.980f, 0.980f, 0.824f);
const Color3 Color3::Lightgray(0.827f, 0.827f, 0.827f);
const Color3 Color3::Lightgreen(0.565f, 0.933f, 0.565f);
const Color3 Color3::Lightgrey(0.827f, 0.827f, 0.827f);
const Color3 Color3::Lightpink(1.000f, 0.714f, 0.757f);
const Color3 Color3::Lightsalmon(1.000f, 0.627f, 0.478f);
const Color3 Color3::Lightseagreen(0.125f, 0.698f, 0.667f);
const Color3 Color3::Lightskyblue(0.529f, 0.808f, 0.980f);
const Color3 Color3::Lightslategray(0.467f, 0.533f, 0.600f);
const Color3 Color3::Lightslategrey(0.467f, 0.533f, 0.600f);
const Color3 Color3::Lightsteelblue(0.690f, 0.769f, 0.871f);
const Color3 Color3::Lightyellow(1.000f, 1.000f, 0.878f);
const Color3 Color3::Lime(0.000f, 1.000f, 0.000f);
const Color3 Color3::Limegreen(0.196f, 0.804f, 0.196f);
const Color3 Color3::Linen(0.980f, 0.941f, 0.902f);
const Color3 Color3::Magenta(1.000f, 0.000f, 1.000f);
const Color3 Color3::Maroon(0.502f, 0.000f, 0.000f);
const Color3 Color3::Mediumaquamarine(0.400f, 0.804f, 0.667f);
const Color3 Color3::Mediumblue(0.000f, 0.000f, 0.804f);
const Color3 Color3::Mediumorchid(0.729f, 0.333f, 0.827f);
const Color3 Color3::Mediumpurple(0.576f, 0.439f, 0.859f);
const Color3 Color3::Mediumseagreen(0.235f, 0.702f, 0.443f);
const Color3 Color3::Mediumslateblue(0.482f, 0.408f, 0.933f);
const Color3 Color3::Mediumspringgreen(0.000f, 0.980f, 0.604f);
const Color3 Color3::Mediumturquoise(0.282f, 0.820f, 0.800f);
const Color3 Color3::Mediumvioletred(0.780f, 0.082f, 0.522f);
const Color3 Color3::Midnightblue(0.098f, 0.098f, 0.439f);
const Color3 Color3::Mintcream(0.961f, 1.000f, 0.980f);
const Color3 Color3::Mistyrose(1.000f, 0.894f, 0.882f);
const Color3 Color3::Moccasin(1.000f, 0.894f, 0.710f);
const Color3 Color3::Navajowhite(1.000f, 0.871f, 0.678f);
const Color3 Color3::Navy(0.000f, 0.000f, 0.502f);
const Color3 Color3::Oldlace(0.992f, 0.961f, 0.902f);
const Color3 Color3::Olive(0.502f, 0.502f, 0.000f);
const Color3 Color3::Olivedrab(0.420f, 0.557f, 0.137f);
const Color3 Color3::Orange(1.000f, 0.647f, 0.000f);
const Color3 Color3::Orangered(1.000f, 0.271f, 0.000f);
const Color3 Color3::Orchid(0.855f, 0.439f, 0.839f);
const Color3 Color3::Palegoldenrod(0.933f, 0.910f, 0.667f);
const Color3 Color3::Palegreen(0.596f, 0.984f, 0.596f);
const Color3 Color3::Paleturquoise(0.686f, 0.933f, 0.933f);
const Color3 Color3::Palevioletred(0.859f, 0.439f, 0.576f);
const Color3 Color3::Papayawhip(1.000f, 0.937f, 0.835f);
const Color3 Color3::Peachpuff(1.000f, 0.855f, 0.725f);
const Color3 Color3::Peru(0.804f, 0.522f, 0.247f);
const Color3 Color3::Pink(1.000f, 0.753f, 0.796f);
const Color3 Color3::Plum(0.867f, 0.627f, 0.867f);
const Color3 Color3::Powderblue(0.690f, 0.878f, 0.902f);
const Color3 Color3::Purple(0.502f, 0.000f, 0.502f);
const Color3 Color3::Red(1.000f, 0.000f, 0.000f);
const Color3 Color3::Rosybrown(0.737f, 0.561f, 0.561f);
const Color3 Color3::Royalblue(0.255f, 0.412f, 0.882f);
const Color3 Color3::Saddlebrown(0.545f, 0.271f, 0.075f);
const Color3 Color3::Salmon(0.980f, 0.502f, 0.447f);
const Color3 Color3::Sandybrown(0.957f, 0.643f, 0.376f);
const Color3 Color3::Seagreen(0.180f, 0.545f, 0.341f);
const Color3 Color3::Seashell(1.000f, 0.961f, 0.933f);
const Color3 Color3::Sienna(0.627f, 0.322f, 0.176f);
const Color3 Color3::Silver(0.753f, 0.753f, 0.753f);
const Color3 Color3::Skyblue(0.529f, 0.808f, 0.922f);
const Color3 Color3::Slateblue(0.416f, 0.353f, 0.804f);
const Color3 Color3::Slategray(0.439f, 0.502f, 0.565f);
const Color3 Color3::Slategrey(0.439f, 0.502f, 0.565f);
const Color3 Color3::Snow(1.000f, 0.980f, 0.980f);
const Color3 Color3::Springgreen(0.000f, 1.000f, 0.498f);
const Color3 Color3::Steelblue(0.275f, 0.510f, 0.706f);
const Color3 Color3::Tan(0.824f, 0.706f, 0.549f);
const Color3 Color3::Teal(0.000f, 0.502f, 0.502f);
const Color3 Color3::Thistle(0.847f, 0.749f, 0.847f);
const Color3 Color3::Tomato(1.000f, 0.388f, 0.278f);
const Color3 Color3::Turquoise(0.251f, 0.878f, 0.816f);
const Color3 Color3::Violet(0.933f, 0.510f, 0.933f);
const Color3 Color3::Wheat(0.961f, 0.871f, 0.702f);
const Color3 Color3::White(1.000f, 1.000f, 1.000f);
const Color3 Color3::Whitesmoke(0.961f, 0.961f, 0.961f);
const Color3 Color3::Yellow(1.000f, 1.000f, 0.000f);
const Color3 Color3::Yellowgreen(0.604f, 0.804f, 0.196f);
Color3::Color3(const float red, const float green, const float blue)
{
this->red = red;
this->green = green;
this->blue = blue;
}
float Color3::getRed() const
{
return red;
}
float Color3::getGreen() const
{
return green;
}
float Color3::getBlue() const
{
return blue;
}
1
solved C++ Declaration is Incompatible With Function