I am trying to display myValue in the MessageBox. I use C++ 2008.
How is this possible. It seems that MessageBox in this case only can display a string, "".
int myValue = 0;
double myVal2 = 3.14;
myValue = myVal2;
MessageBox::Show(myValue);
Printable View
I am trying to display myValue in the MessageBox. I use C++ 2008.
How is this possible. It seems that MessageBox in this case only can display a string, "".
int myValue = 0;
double myVal2 = 3.14;
myValue = myVal2;
MessageBox::Show(myValue);
I would guess stringstream.
Untested, because I'm lazy:
Code:std::string myValue;
std::stringstream myValueSS;
myValueSS << myVal2;
myValue = myValueSS.str();
Please don't cross-post.
http://cboard.cprogramming.com/showthread.php?t=98301