dynamic_cast of void *
<p>I need to use dynamic cast void*</p>

<pre><code>void *target = (MYClass*)target;//I am storing initially(to implment delegate mechanism)
....
delegateClass *delegate = dynamic_cast&lt;delegateClass*&gt;(target);
</code></pre>

<p>It is giving error cannot convert void*, I cannot use below code... since it is a delegate mechanism</p>

<pre><code>delegateClass *delegate = dynamic_cast&lt;delegateClass*&gt;(((MYClass*))target);
</code></pre>

<p>How to get the type of target and implement... If i use typeid() i can get the name of the class but how to use typeid in the above equation instead of (((MYClass*))target).</p>
