static_cast to a struct type to access all of its member variable : <p>I have a structure like below:</p>

<pre><code>struct Param
{
    Param(const void* a, const std::vector&lt;int&gt;&amp; b) : c(a), d(b) {}
    const void* c;  
    const std::vector&lt;int&gt; d; 
};
</code></pre>

<p>Now after creating a new instance of Param struct I store a class instance 'this' pointer in the member variable c. Later in a C Api (within C++ code) I need to refer back to the class pointer to invoke a method:</p>

<pre><code>static_cast&lt;ClassA*&gt;(static_cast&lt;Param*&gt;(var-&gt;addr)-&gt;c)-&gt;ClassAMethod()
</code></pre>

<p>But the compiler states invalid expression type conversion. How can I refer to both Param structure variables in C Apis if the address of Param instance is stored in 'addr' variable?</p>
