Originally Posted by
grumpy
No need for the LPCSTR conversions.
Input streaming operations (like buff>>strOutput) stop at the first whitespace by default unless end of stream is reached first.
basic_stringstream has a method named str() which returns a string object that contains a copy of the stream buffer. So try strOutput = buff.str();
Ah ha! That explains the spaces. I should have remembered that streams end with whitespace. I've had problems with that before. Thank you!
Now, using that function and regular std::string
Code:
string strOutput;
stringstream buff;
buff << "Camera pos: ("<<camerax<<", "<<cameray<<", "<<cameraz<<")";
strOutput=buff.str();
D3DXCreateTextureFromFileA(...,strOutput,...);