Is it not necessary to define a class member function?
<p>The following code compiles and runs perfectly,</p>

<pre><code>#include &lt;iostream&gt;

class sam {
    public:
        void func1();
        int func2();
};

int main() {
    sam s;
}
</code></pre>

<p>Should it not produce a error for the lack of class member definition?</p>
