I'm making a game in opengl and I've had an issue with converting a string to a const char*. Here is my code:
for (GLuint i = 0; i < faces.size(); i++)
{
string fileName(faces[i]),
texture = "../content/skybox/" + fileName + ".jpg";
faces[i] = texture.c_str();
}
Unfortunately once run, the faces[i] just becomes a mess.