calling base class functions
<p>I have following classes.</p>

<pre><code>class A
{

public:

void fun();

}

class B: public A
{

}

class C: public A
{

}

A * ptr = new C;
</code></pre>

<p>Is it ok to do something like below? Will i have some problems if introduce some virtual functions in the baseclass?</p>

<pre><code>((B *)ptr)-&gt;fun();
</code></pre>

<p>This may look stupid, but i have a function that calls A's function through B and i don't want to change that.</p>
