{"id":19926,"date":"2022-11-08T04:00:18","date_gmt":"2022-11-07T22:30:18","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/"},"modified":"2022-11-08T04:00:18","modified_gmt":"2022-11-07T22:30:18","slug":"solved-c-declaration-is-incompatible-with-function","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/","title":{"rendered":"[Solved] C++ Declaration is Incompatible With Function"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-26752151\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"26752151\" data-parentid=\"26751539\" data-score=\"0\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>The answer was found by user @Niall. I simply forgot to add #pragma once at the top of my Color3.h<\/p>\n<pre><code>#pragma  once\nclass Color3{\npublic:\n    Color3();\n    Color3(const float red, const float green, const float blue);\n    float getRed() const;\n    float getGreen() const;\n    float getBlue() const;\n    \/*\n    Preset Colors\n    *\/\n    static const Color3 Aliceblue;\n    static const Color3 Antiquewhite;\n    static const Color3 Aqua;\n    static const Color3 Aquamarine;\n    static const Color3 Azure;\n    static const Color3 Beige;\n    static const Color3 Bisque;\n    static const Color3 Black;\n    static const Color3 Blanchedalmond;\n    static const Color3 Blue;\n    static const Color3 Blueviolet;\n    static const Color3 Brown;\n    static const Color3 Burlywood;\n    static const Color3 Cadetblue;\n    static const Color3 Chartreuse;\n    static const Color3 Chocolate;\n    static const Color3 Coral;\n    static const Color3 Cornflowerblue;\n    static const Color3 Cornsilk;\n    static const Color3 Crimson;\n    static const Color3 Cyan;\n    static const Color3 Darkblue;\n    static const Color3 Darkcyan;\n    static const Color3 Darkgoldenrod;\n    static const Color3 Darkgray;\n    static const Color3 Darkgreen;\n    static const Color3 Darkgrey;\n    static const Color3 Darkkhaki;\n    static const Color3 Darkmagenta;\n    static const Color3 Darkolivegreen;\n    static const Color3 Darkorange;\n    static const Color3 Darkorchid;\n    static const Color3 Darkred;\n    static const Color3 Darksalmon;\n    static const Color3 Darkseagreen;\n    static const Color3 Darkslateblue;\n    static const Color3 Darkslategray;\n    static const Color3 Darkslategrey;\n    static const Color3 Darkturquoise;\n    static const Color3 Darkviolet;\n    static const Color3 Deeppink;\n    static const Color3 Deepskyblue;\n    static const Color3 Dimgray;\n    static const Color3 Dimgrey;\n    static const Color3 Dodgerblue;\n    static const Color3 Firebrick;\n    static const Color3 Floralwhite;\n    static const Color3 Forestgreen;\n    static const Color3 Fuchsia;\n    static const Color3 Gainsboro;\n    static const Color3 Ghostwhite;\n    static const Color3 Gold;\n    static const Color3 Goldenrod;\n    static const Color3 Gray;\n    static const Color3 Green;\n    static const Color3 Greenyellow;\n    static const Color3 Grey;\n    static const Color3 Honeydew;\n    static const Color3 Hotpink;\n    static const Color3 Indianred;\n    static const Color3 Indigo;\n    static const Color3 Ivory;\n    static const Color3 Khaki;\n    static const Color3 Lavender;\n    static const Color3 Lavenderblush;\n    static const Color3 Lawngreen;\n    static const Color3 Lemonchiffon;\n    static const Color3 Lightblue;\n    static const Color3 Lightcoral;\n    static const Color3 Lightcyan;\n    static const Color3 Lightgoldenrodyellow;\n    static const Color3 Lightgray;\n    static const Color3 Lightgreen;\n    static const Color3 Lightgrey;\n    static const Color3 Lightpink;\n    static const Color3 Lightsalmon;\n    static const Color3 Lightseagreen;\n    static const Color3 Lightskyblue;\n    static const Color3 Lightslategray;\n    static const Color3 Lightslategrey;\n    static const Color3 Lightsteelblue;\n    static const Color3 Lightyellow;\n    static const Color3 Lime;\n    static const Color3 Limegreen;\n    static const Color3 Linen;\n    static const Color3 Magenta;\n    static const Color3 Maroon;\n    static const Color3 Mediumaquamarine;\n    static const Color3 Mediumblue;\n    static const Color3 Mediumorchid;\n    static const Color3 Mediumpurple;\n    static const Color3 Mediumseagreen;\n    static const Color3 Mediumslateblue;\n    static const Color3 Mediumspringgreen;\n    static const Color3 Mediumturquoise;\n    static const Color3 Mediumvioletred;\n    static const Color3 Midnightblue;\n    static const Color3 Mintcream;\n    static const Color3 Mistyrose;\n    static const Color3 Moccasin;\n    static const Color3 Navajowhite;\n    static const Color3 Navy;\n    static const Color3 Oldlace;\n    static const Color3 Olive;\n    static const Color3 Olivedrab;\n    static const Color3 Orange;\n    static const Color3 Orangered;\n    static const Color3 Orchid;\n    static const Color3 Palegoldenrod;\n    static const Color3 Palegreen;\n    static const Color3 Paleturquoise;\n    static const Color3 Palevioletred;\n    static const Color3 Papayawhip;\n    static const Color3 Peachpuff;\n    static const Color3 Peru;\n    static const Color3 Pink;\n    static const Color3 Plum;\n    static const Color3 Powderblue;\n    static const Color3 Purple;\n    static const Color3 Red;\n    static const Color3 Rosybrown;\n    static const Color3 Royalblue;\n    static const Color3 Saddlebrown;\n    static const Color3 Salmon;\n    static const Color3 Sandybrown;\n    static const Color3 Seagreen;\n    static const Color3 Seashell;\n    static const Color3 Sienna;\n    static const Color3 Silver;\n    static const Color3 Skyblue;\n    static const Color3 Slateblue;\n    static const Color3 Slategray;\n    static const Color3 Slategrey;\n    static const Color3 Snow;\n    static const Color3 Springgreen;\n    static const Color3 Steelblue;\n    static const Color3 Tan;\n    static const Color3 Teal;\n    static const Color3 Thistle;\n    static const Color3 Tomato;\n    static const Color3 Turquoise;\n    static const Color3 Violet;\n    static const Color3 Wheat;\n    static const Color3 White;\n    static const Color3 Whitesmoke;\n    static const Color3 Yellow;\n    static const Color3 Yellowgreen;\n\nprivate:\n    float red;\n    float green;\n    float blue;\n};\n\n\nconst Color3 Color3::Aliceblue(0.941f, 0.973f, 1.000f);\nconst Color3 Color3::Antiquewhite(0.980f, 0.922f, 0.843f);\nconst Color3 Color3::Aqua(0.000f, 1.000f, 1.000f);\nconst Color3 Color3::Aquamarine(0.498f, 1.000f, 0.831f);\nconst Color3 Color3::Azure(0.941f, 1.000f, 1.000f);\nconst Color3 Color3::Beige(0.961f, 0.961f, 0.863f);\nconst Color3 Color3::Bisque(1.000f, 0.894f, 0.769f);\nconst Color3 Color3::Black(0.000f, 0.000f, 0.000f);\nconst Color3 Color3::Blanchedalmond(1.000f, 0.922f, 0.804f);\nconst Color3 Color3::Blue(0.000f, 0.000f, 1.000f);\nconst Color3 Color3::Blueviolet(0.541f, 0.169f, 0.886f);\nconst Color3 Color3::Brown(0.647f, 0.165f, 0.165f);\nconst Color3 Color3::Burlywood(0.871f, 0.722f, 0.529f);\nconst Color3 Color3::Cadetblue(0.373f, 0.620f, 0.627f);\nconst Color3 Color3::Chartreuse(0.498f, 1.000f, 0.000f);\nconst Color3 Color3::Chocolate(0.824f, 0.412f, 0.118f);\nconst Color3 Color3::Coral(1.000f, 0.498f, 0.314f);\nconst Color3 Color3::Cornflowerblue(0.392f, 0.584f, 0.929f);\nconst Color3 Color3::Cornsilk(1.000f, 0.973f, 0.863f);\nconst Color3 Color3::Crimson(0.863f, 0.078f, 0.235f);\nconst Color3 Color3::Cyan(0.000f, 1.000f, 1.000f);\nconst Color3 Color3::Darkblue(0.000f, 0.000f, 0.545f);\nconst Color3 Color3::Darkcyan(0.000f, 0.545f, 0.545f);\nconst Color3 Color3::Darkgoldenrod(0.722f, 0.525f, 0.043f);\nconst Color3 Color3::Darkgray(0.663f, 0.663f, 0.663f);\nconst Color3 Color3::Darkgreen(0.000f, 0.392f, 0.000f);\nconst Color3 Color3::Darkgrey(0.663f, 0.663f, 0.663f);\nconst Color3 Color3::Darkkhaki(0.741f, 0.718f, 0.420f);\nconst Color3 Color3::Darkmagenta(0.545f, 0.000f, 0.545f);\nconst Color3 Color3::Darkolivegreen(0.333f, 0.420f, 0.184f);\nconst Color3 Color3::Darkorange(1.000f, 0.549f, 0.000f);\nconst Color3 Color3::Darkorchid(0.600f, 0.196f, 0.800f);\nconst Color3 Color3::Darkred(0.545f, 0.000f, 0.000f);\nconst Color3 Color3::Darksalmon(0.914f, 0.588f, 0.478f);\nconst Color3 Color3::Darkseagreen(0.561f, 0.737f, 0.561f);\nconst Color3 Color3::Darkslateblue(0.282f, 0.239f, 0.545f);\nconst Color3 Color3::Darkslategray(0.184f, 0.310f, 0.310f);\nconst Color3 Color3::Darkslategrey(0.184f, 0.310f, 0.310f);\nconst Color3 Color3::Darkturquoise(0.000f, 0.808f, 0.820f);\nconst Color3 Color3::Darkviolet(0.580f, 0.000f, 0.827f);\nconst Color3 Color3::Deeppink(1.000f, 0.078f, 0.576f);\nconst Color3 Color3::Deepskyblue(0.000f, 0.749f, 1.000f);\nconst Color3 Color3::Dimgray(0.412f, 0.412f, 0.412f);\nconst Color3 Color3::Dimgrey(0.412f, 0.412f, 0.412f);\nconst Color3 Color3::Dodgerblue(0.118f, 0.565f, 1.000f);\nconst Color3 Color3::Firebrick(0.698f, 0.133f, 0.133f);\nconst Color3 Color3::Floralwhite(1.000f, 0.980f, 0.941f);\nconst Color3 Color3::Forestgreen(0.133f, 0.545f, 0.133f);\nconst Color3 Color3::Fuchsia(1.000f, 0.000f, 1.000f);\nconst Color3 Color3::Gainsboro(0.863f, 0.863f, 0.863f);\nconst Color3 Color3::Ghostwhite(0.973f, 0.973f, 1.000f);\nconst Color3 Color3::Gold(1.000f, 0.843f, 0.000f);\nconst Color3 Color3::Goldenrod(0.855f, 0.647f, 0.125f);\nconst Color3 Color3::Gray(0.502f, 0.502f, 0.502f);\nconst Color3 Color3::Green(0.000f, 0.502f, 0.000f);\nconst Color3 Color3::Greenyellow(0.678f, 1.000f, 0.184f);\nconst Color3 Color3::Grey(0.502f, 0.502f, 0.502f);\nconst Color3 Color3::Honeydew(0.941f, 1.000f, 0.941f);\nconst Color3 Color3::Hotpink(1.000f, 0.412f, 0.706f);\nconst Color3 Color3::Indianred(0.804f, 0.361f, 0.361f);\nconst Color3 Color3::Indigo(0.294f, 0.000f, 0.510f);\nconst Color3 Color3::Ivory(1.000f, 1.000f, 0.941f);\nconst Color3 Color3::Khaki(0.941f, 0.902f, 0.549f);\nconst Color3 Color3::Lavender(0.902f, 0.902f, 0.980f);\nconst Color3 Color3::Lavenderblush(1.000f, 0.941f, 0.961f);\nconst Color3 Color3::Lawngreen(0.486f, 0.988f, 0.000f);\nconst Color3 Color3::Lemonchiffon(1.000f, 0.980f, 0.804f);\nconst Color3 Color3::Lightblue(0.678f, 0.847f, 0.902f);\nconst Color3 Color3::Lightcoral(0.941f, 0.502f, 0.502f);\nconst Color3 Color3::Lightcyan(0.878f, 1.000f, 1.000f);\nconst Color3 Color3::Lightgoldenrodyellow(0.980f, 0.980f, 0.824f);\nconst Color3 Color3::Lightgray(0.827f, 0.827f, 0.827f);\nconst Color3 Color3::Lightgreen(0.565f, 0.933f, 0.565f);\nconst Color3 Color3::Lightgrey(0.827f, 0.827f, 0.827f);\nconst Color3 Color3::Lightpink(1.000f, 0.714f, 0.757f);\nconst Color3 Color3::Lightsalmon(1.000f, 0.627f, 0.478f);\nconst Color3 Color3::Lightseagreen(0.125f, 0.698f, 0.667f);\nconst Color3 Color3::Lightskyblue(0.529f, 0.808f, 0.980f);\nconst Color3 Color3::Lightslategray(0.467f, 0.533f, 0.600f);\nconst Color3 Color3::Lightslategrey(0.467f, 0.533f, 0.600f);\nconst Color3 Color3::Lightsteelblue(0.690f, 0.769f, 0.871f);\nconst Color3 Color3::Lightyellow(1.000f, 1.000f, 0.878f);\nconst Color3 Color3::Lime(0.000f, 1.000f, 0.000f);\nconst Color3 Color3::Limegreen(0.196f, 0.804f, 0.196f);\nconst Color3 Color3::Linen(0.980f, 0.941f, 0.902f);\nconst Color3 Color3::Magenta(1.000f, 0.000f, 1.000f);\nconst Color3 Color3::Maroon(0.502f, 0.000f, 0.000f);\nconst Color3 Color3::Mediumaquamarine(0.400f, 0.804f, 0.667f);\nconst Color3 Color3::Mediumblue(0.000f, 0.000f, 0.804f);\nconst Color3 Color3::Mediumorchid(0.729f, 0.333f, 0.827f);\nconst Color3 Color3::Mediumpurple(0.576f, 0.439f, 0.859f);\nconst Color3 Color3::Mediumseagreen(0.235f, 0.702f, 0.443f);\nconst Color3 Color3::Mediumslateblue(0.482f, 0.408f, 0.933f);\nconst Color3 Color3::Mediumspringgreen(0.000f, 0.980f, 0.604f);\nconst Color3 Color3::Mediumturquoise(0.282f, 0.820f, 0.800f);\nconst Color3 Color3::Mediumvioletred(0.780f, 0.082f, 0.522f);\nconst Color3 Color3::Midnightblue(0.098f, 0.098f, 0.439f);\nconst Color3 Color3::Mintcream(0.961f, 1.000f, 0.980f);\nconst Color3 Color3::Mistyrose(1.000f, 0.894f, 0.882f);\nconst Color3 Color3::Moccasin(1.000f, 0.894f, 0.710f);\nconst Color3 Color3::Navajowhite(1.000f, 0.871f, 0.678f);\nconst Color3 Color3::Navy(0.000f, 0.000f, 0.502f);\nconst Color3 Color3::Oldlace(0.992f, 0.961f, 0.902f);\nconst Color3 Color3::Olive(0.502f, 0.502f, 0.000f);\nconst Color3 Color3::Olivedrab(0.420f, 0.557f, 0.137f);\nconst Color3 Color3::Orange(1.000f, 0.647f, 0.000f);\nconst Color3 Color3::Orangered(1.000f, 0.271f, 0.000f);\nconst Color3 Color3::Orchid(0.855f, 0.439f, 0.839f);\nconst Color3 Color3::Palegoldenrod(0.933f, 0.910f, 0.667f);\nconst Color3 Color3::Palegreen(0.596f, 0.984f, 0.596f);\nconst Color3 Color3::Paleturquoise(0.686f, 0.933f, 0.933f);\nconst Color3 Color3::Palevioletred(0.859f, 0.439f, 0.576f);\nconst Color3 Color3::Papayawhip(1.000f, 0.937f, 0.835f);\nconst Color3 Color3::Peachpuff(1.000f, 0.855f, 0.725f);\nconst Color3 Color3::Peru(0.804f, 0.522f, 0.247f);\nconst Color3 Color3::Pink(1.000f, 0.753f, 0.796f);\nconst Color3 Color3::Plum(0.867f, 0.627f, 0.867f);\nconst Color3 Color3::Powderblue(0.690f, 0.878f, 0.902f);\nconst Color3 Color3::Purple(0.502f, 0.000f, 0.502f);\nconst Color3 Color3::Red(1.000f, 0.000f, 0.000f);\nconst Color3 Color3::Rosybrown(0.737f, 0.561f, 0.561f);\nconst Color3 Color3::Royalblue(0.255f, 0.412f, 0.882f);\nconst Color3 Color3::Saddlebrown(0.545f, 0.271f, 0.075f);\nconst Color3 Color3::Salmon(0.980f, 0.502f, 0.447f);\nconst Color3 Color3::Sandybrown(0.957f, 0.643f, 0.376f);\nconst Color3 Color3::Seagreen(0.180f, 0.545f, 0.341f);\nconst Color3 Color3::Seashell(1.000f, 0.961f, 0.933f);\nconst Color3 Color3::Sienna(0.627f, 0.322f, 0.176f);\nconst Color3 Color3::Silver(0.753f, 0.753f, 0.753f);\nconst Color3 Color3::Skyblue(0.529f, 0.808f, 0.922f);\nconst Color3 Color3::Slateblue(0.416f, 0.353f, 0.804f);\nconst Color3 Color3::Slategray(0.439f, 0.502f, 0.565f);\nconst Color3 Color3::Slategrey(0.439f, 0.502f, 0.565f);\nconst Color3 Color3::Snow(1.000f, 0.980f, 0.980f);\nconst Color3 Color3::Springgreen(0.000f, 1.000f, 0.498f);\nconst Color3 Color3::Steelblue(0.275f, 0.510f, 0.706f);\nconst Color3 Color3::Tan(0.824f, 0.706f, 0.549f);\nconst Color3 Color3::Teal(0.000f, 0.502f, 0.502f);\nconst Color3 Color3::Thistle(0.847f, 0.749f, 0.847f);\nconst Color3 Color3::Tomato(1.000f, 0.388f, 0.278f);\nconst Color3 Color3::Turquoise(0.251f, 0.878f, 0.816f);\nconst Color3 Color3::Violet(0.933f, 0.510f, 0.933f);\nconst Color3 Color3::Wheat(0.961f, 0.871f, 0.702f);\nconst Color3 Color3::White(1.000f, 1.000f, 1.000f);\nconst Color3 Color3::Whitesmoke(0.961f, 0.961f, 0.961f);\nconst Color3 Color3::Yellow(1.000f, 1.000f, 0.000f);\nconst Color3 Color3::Yellowgreen(0.604f, 0.804f, 0.196f);\n\nColor3::Color3(const float red, const float green, const float blue)\n{\n    this-&gt;red = red;\n    this-&gt;green = green;\n    this-&gt;blue = blue;\n}\n\nfloat Color3::getRed() const\n{\n    return red;\n}\n\nfloat Color3::getGreen() const\n{\n    return green;\n}\n\nfloat Color3::getBlue() const\n{\n    return blue;\n}\n<\/code><\/pre>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">1<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved C++ Declaration is Incompatible With Function <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] 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 &#8230; <a title=\"[Solved] C++ Declaration is Incompatible With Function\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\" aria-label=\"More on [Solved] C++ Declaration is Incompatible With Function\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[324],"class_list":["post-19926","post","type-post","status-publish","format-standard","hentry","category-solved","tag-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] C++ Declaration is Incompatible With Function - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] C++ Declaration is Incompatible With Function - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] 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 ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-07T22:30:18+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] C++ Declaration is Incompatible With Function\",\"datePublished\":\"2022-11-07T22:30:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\"},\"wordCount\":37,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"c++\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\",\"name\":\"[Solved] C++ Declaration is Incompatible With Function - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-11-07T22:30:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] C++ Declaration is Incompatible With Function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] C++ Declaration is Incompatible With Function - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] C++ Declaration is Incompatible With Function - JassWeb","og_description":"[ad_1] 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 ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/","og_site_name":"JassWeb","article_published_time":"2022-11-07T22:30:18+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] C++ Declaration is Incompatible With Function","datePublished":"2022-11-07T22:30:18+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/"},"wordCount":37,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["c++"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/","url":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/","name":"[Solved] C++ Declaration is Incompatible With Function - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-11-07T22:30:18+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-c-declaration-is-incompatible-with-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] C++ Declaration is Incompatible With Function"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775193939","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/19926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=19926"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/19926\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=19926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=19926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=19926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}