I'm trying to concat "(" + mouseX + ", " + mouseY ")". However, mouseX and mouseY are ints, so I tried using a stringstream as follows:
std::stringstream pos;
pos << "(" << mouseX << ", " << mouseY << ")";
_glutBitmapString(GLUT_BITMAP_HELVETICA_12, pos.str());
And it doesn't seem to work.
I get the following error:
mouse.cpp:75: error: cannot convert
std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to
const char*' for argument2' to
void glutBitmapString(void, const char*)'
What am I doing wrong in this basic string + integer concatenation?