Hi guys, I would like to have the header below:
Paths.h
#pragma once
#include <string>
namespace Paths {
namespace Images {
static std::string CHECKER = "Graphics/Checker.png";
}
namespace Fonts {
static std::string BUBBLEBATH = "Fonts/BUBBLEBATH.ttf";
}
}
Included all around the place so that I can do stuff like Paths::Images::CHECKER to easily load the proper file or to request it again by passing that to a map as a key.
Though this I believe create a copy of the static string for every compilation unit, am I correct? Meaning I include it in 10 cpp and get 10 copies of each string. How would I do this the proper way?