field declared void / struct or variable not declared in this scope
<p>I've been teaching myself some OpenGL using SFML for creating windows/handling inputs, etc. My main.cpp started getting a bit unwieldy so I decided to start splitting my code up. I created a 4X_vertex.h and a 4X_vertex.cpp (4X is the name of the project) and moved the relevant functions and structs out of my main and into these files. However, when I compile, I get the error</p>

<pre><code>variable or field "drawVertexArray" declared void
</code></pre>

<p>which from my research seems to be just an unhelpful message relating to the next error, which is</p>

<pre><code>vertex was not declared in this scope
</code></pre>

<p>Here's my list of includes from my <code>main.cpp</code>:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
#include &lt;SFML/System.hpp&gt;
#include &lt;SFML/Window.hpp&gt;
#include &lt;SFML/Graphics.hpp&gt;
#include "4x_vertex.h"
#include "4x_constants.h"
</code></pre>

<p>My <code>4X_vertex.h</code>:</p>

<pre><code>#ifndef _4X_VERT_H
#define _4X_VERT_H
struct vertex{
        GLfloat x,y,z;
        GLfloat r,g,b;
};
void drawVertexArray(vertex v[]);
vertex* loadVertexData();
#include "4X_vertex.cpp"
#endif
</code></pre>

<p>The part of <code>4X_vertex.cpp</code> that's giving me the trouble:</p>

<pre><code>using namespace std;

void drawVertexArray(vertex v[]){
    ... openGL stuff...
}
</code></pre>

<p>All of this worked before I started moving it around so I'm assuming there's something weird going on with the includes, or something. All help is greatly appreciated!</p>
