<p>I have seen a function whose prototype is:</p>

<pre><code>int myfunc(void** ppt)
</code></pre>

<p>This function is called in a C file as 
    a = myfunc(mystruct **var1);</p>

<p>where mystruct is typedef for one of structure we have. </p>

<p>This works without any compilation errors in MSVC6.0, But when I compile it with some other C compiler, it gives an error at the place where this function is called with error message:</p>

<p><strong>Argument of type mystruct ** is incompatible with parameter of type void **</strong></p>

<p>The argument of myfunc() is kept as void** because it seems to be a generic malloc kind of function to be called with various structure variable types for memory allocation  </p>

<ol>
<li>Is there any type such as void ** allowed in C standard/any C compilers?</li>
<li>How do I fix this? [I tried casting the function call argument to <code>mystruct**</code>, but it didn't work]</li>
</ol>

<p>-AD</p>

```
void**
```
is
valid but, based on your error message, you probably have to explicitly cast the argument as follows:
```
```
mystruct **var1;
x = myfunc ((void**) var1);
```
```
That's because the
```
myfunc
```
function is expecting the
```
void**
```
type. While
```
void*
```
can be implicitly cast to any other pointer, that is not so for the double pointer - you need to explicitly cast it.