Original Post
I can't understand what is going wrong with my program. I can use use map in a test program but in my engine I'm writting I can't get it map to perform any functions without getting a segfault. I declare the map like this:
std::map< uint, sTexture > m_Textures; sTexture is a structure for my textures and here is its declaration: struct sTexture
{
GLuint Texture;
std::string Filename;
GLfloat Width;
GLfloat Height;
}; Then when I try to access the map or do anything with it it segfaults. I've tried a few functions of map, here are the ones make it crash. m_Textures.empty();
m_Textures.size();
m_Textures[ place ] = Tex; For reference place is a uint and Tex is a sTexture struct. Here is the exact error message: Fatal signal: Segmentation Fault (SDL Parachute Deployed) Any idea why map would cause a segfault?