Class Definition Instance Instantiation Question
<p>I have a class <em>imgmanager</em> that allows me to load all my images exactly once, it's quite nice, and while prototyping I had all of my files in one place, so I didn't have to worry about cyclical definitions. However after separating all of my classes I have a problem.</p>

<p><strong>My Header File</strong>  </p>

<pre><code>#ifndef IMAGEMANAGER_H   
#define IMAGEMANAGER_H
#include "Img.h"
#include &lt;vector&gt;
#include &lt;map&gt;
#include &lt;string&gt;

class imgmanager{
 protected:
 std::vector&lt;sf::Image*&gt; images;
 std::map&lt;std::string,int&gt; positions;
 public:
 sf::Image* addimg(std::string path); //relative to resources
 sf::Image* getimg(std::string path);
 int size();
 virtual ~imgmanager();
 sf::Image* operator[](int);
}imagemgr;

#endif
</code></pre>

<p>With the instance created after the } and before the ; my compiler complains at me:</p>

<p>So I ask: What should I do to have a global instance of my imagemgr class? Should I just make a global header file and create an instance? (in this particular case I <em>can</em> just make a global variable in my main.cpp, none of the headers require the instance)</p>

<p><img src="http://i.stack.imgur.com/Ln3gB.png" alt="Problem Screencap"></p>
