Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting double type to 32-bit character string (LPSTR)

Status
Not open for further replies.

TimeOut

Programmer
Nov 21, 2000
16
GB
Hi everyone!

Please can somebody stop my heartache...

How do you convert a double type to a 32-bit character string (a LPSTR), without losing any data?

I can do this by using 'sizeof' but too much data is lost!

Here is my warning...

warning C4244: '=' : conversion from 'double' to 'char', possible loss of data
 
Take a look at _gcvt(), _ecvt() and _fcvt().

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top