Const char* weird behavior
<p>Hello im having problems with const char* being the same in a weird way.
Color::Text() returns a static char array but it is also used to initialize const char* pointer for array.</p>

<p>wtf do i do if i want rofl::Default to actually work and not be the latest "const char" it Color::Text produced?</p>

<pre><code>#include &lt;windows.h&gt;
class Color
{
public:
    int R;
    int G;
    int B;
    int A;
    Color(int r, int b, int g, int a = 255)
    {
    R = r;
    G = g;
    B = b;
    A = a;
    }
    const char* Text()
    {
    static char Texts[124];
    snprintf(Texts, 124, "%i %i %i %i", R, G, B, A);
    return Texts;
    }
}
class rofl
{
public:
    const char* Default;
    const char* Value;
    rofl(const char* d)
    {
        Default = d;
        Value = d;
    }
}

rofl dood("0");
rofl doaaod(Color(0,0,0).Text());
rofl xxxx(Color(0,55,0).Text());

int main()
{
    printf("%s %s\n", dood.Default, dood.Value);
    printf("%s %s\n", doaaod.Default, doaaod.Value);
    printf("%s %s\n", xxxx.Default, xxxx.Value);
    return 0;
}
</code></pre>

<p>the output is:</p>

<pre><code>0 0
0 55 0 0 0 0
0 55 0 0 55 0
</code></pre>