Very simple ( I hope ) Windows programming question here, I have a string value taken from an edit box, which I have converted into a double with atof(), I then want to do some calculations and open a MessageBox with the answer in it in the form:
MessageBox(Answer, "Solution:", MB_OK);
However, the first parameter, 'Answer' can only be a string value (I think), so how do I:
a) convert Answer from a double to a string so I can use it in MessageBox()
-or-
b) show a double value in place of Answer
I have looked for a function to convert double to string but I havent found any, only functions like atof() or strtod() for the other way around, but when I try to use Answer in MessageBox() as a double I get:
error C2664: 'MessageBoxA' : cannot convert parameter 1 from 'double' to 'const char *'
There is no context in which this conversion is possible
Thanks for any help