As a response to my own question, it appears that my code didn't like passing the variable that stored the filename as a cost char * when the data in the variable was stored in a string-like format.
To counteract this, I simply changed the code from:
int main ()
{
...
const char* filename = "map.obj";
loadModel(filename);
...
return 0;
}
void loadModel(const char* filename)
{
...
}
to the following:
int main ()
{
...
string filename = "map.obj";
loadModel(filename);
...
return 0;
}
void loadModel(string filename)
{
...
}
where "..." indicates more code as shown in the question.