You can not cast a char* to a string*. The first is a pointer to flat memory. The socond ist a pointer to a class object.
You can create a string object from the returned pointer:
GLenum errCode;string errString;errCode = glGetError();if (errCode != GL_NO_ERROR){ errString = gluErrorString(errCode);}
Or allocate the the string object and initializing the string with the GL errortext:
GLenum errCode;string* errString = 0;errCode = glGetError();if (errCode != GL_NO_ERROR){ errString = new string(gluErrorString(errCode)); // don't forget to delete the string object, so first solution might be better}
(Assuming you're using C++)