Pass pointer to structure
<p>i am used to code in ASM and had the need to switch to C++ for some OpenGL project. Anyway i got the following procedure:</p>

<pre><code>glGenBuffers(Size, PointerToBuff);
</code></pre>

<p>According to what i understand the handles according to the Size argument (Number of buffers) will be stored on PointerToBuff. So i wanted to use an structure to save the 2 handles i will get in case i use:</p>

<pre><code>glGenBuffers(2, *PointerToBuff);
</code></pre>

<p>So i create an struct:</p>

<pre><code>struct VertexHandlers
{
    GLuint cubevertex;
    GLuint trianglevertex;
}VBHandlers;
</code></pre>

<p>And use the proc as this:</p>

<pre><code>glGenBuffers(2, &amp;VBHandlers);
</code></pre>

<p>The error i get its:</p>

<pre><code>error C2664: 'void (GLsizei,GLuint *)' : cannot convert parameter 2 from 'main::VertexHandlers *' to 'GLuint *'
2&gt;          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
2&gt;C:\Documents and Settings\Owner\My Documents\Downloads\OpenGL-tutorial_v0003\playground\playground.cpp(181): error C2664: 'void (GLsizei,GLuint *)' : cannot convert parameter 1 from 'main::VertexHandlers *' to 'GLsizei'
2&gt;          There is no context in which this conversion is possible
</code></pre>

<p>I am not used to "Typecast" barely know something, but when regarding pointers i tought (&amp;) operator will take addr of the local variable created. Hope i get some help, thanks.</p>
