number to LPCSTR!!!!!!?
I apologise if this is a really common question but I searched the board,google,various faqs etc, and ended up with nothing!!(me=frustrated).
So can anyone point me to a function that converts a number to an LPCSTR? I looked in the winapi.hlp and searched msdn and there seems to be no winapi-function that does this?
itoa doesn't like it either (errrorr i get!!!!)
once again I apologise since this thead was intended to go to the windows-section :(
but maybe someone here can help me aswell :)
I suppose sprintf() is what you are after.
I didn't see that you already searched MSDN...
I don't know the windows functions that would do this but I think the C++ STD has stuff for this.
try <cctype.h> or something similar, forget name, it should have conversion functions.
or there is also dynamic_cast<> and static_cast<> functions in the C++ STD LIB.
LPCSTR is a type def for a null terminated char array. Therefore, search the board for the options of going from int to null terminated char array--also known as C string---- and the cast to LPCSTR. Two options are sprint(), itoa() (admittedly a nonstandard function, but very convenient). I think the third option is a stringstream, but you'd have to do some searching to confirm that.