I have a class imgmanager 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.
My Header File
#ifndef IMAGEMANAGER_H
#define IMAGEMANAGER_H
#include "Img.h"
#include <vector>
#include <map>
#include <string>
class imgmanager{
protected:
std::vector<sf::Image*> images;
std::map<std::string,int> 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
With the instance created after the } and before the ; my compiler complains at me:
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 can just make a global variable in my main.cpp, none of the headers require the instance)

Don’t create object instances in headers.
Create your object instance in one source file.
If you need to access it across multiple Translation Units, put this in your header:
This will inform all code that can “see” the header that there exists a so-named object; but it will still only actually be defined in the one source file where you wrote:
(This is analogous to the way in which you declare functions in a header, but define them in precisely one source file:
)
The above general advice dutifully imparted, I would now question the rationale of having a class at all if you’re only going to use one, single, global instance of it. Either make it a “singleton” class, or use free functions in a namespace instead.