Is it legal to write code like C#?
<p>Example:</p>

<p>H</p>

<pre><code>class MyClass {
    int x,y,z;
public:
    MyClass(int,int,int);
    void X();
    void Y();
    void Z();
};
</code></pre>

<p>CPP</p>

<pre><code>class MyClass {
    int x,y,z;
public:
    MyClass(int x,int y,int z) {
        this-&gt;x=x;
        this-&gt;y=y;
        this-&gt;z=z;
    }
    void X() {
        printf("x = %d;\n",x);
    }
    void Y() {
        printf("y = %d;\n",y);
    }
    void Z() {
        printf("z = %d;\n",z);
    }
};
</code></pre>

<p>Make it C#-like.
Don't include the header, re-declare the class in the CPP but with method-bodies.
When file include the header then he gets the extern fields\methods and etc from CPP.</p>

<p>It's legal? I can't predict problems from it. There is?</p>
