string <=> float conversions

I have to do the following conversions:

- string to float
- float to string

I'm using VC++ 6.0 and NT 4.0.

How can I do that?

Thanks a lot
Daniel


danigrafAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Shay050799Connect With a Mentor Commented:
to convert from cstring to float like this:
char szBuf[255];
sprintf(szBuf,str.GetBuffer(1));
float f=atof(szBuf);

to convert from float to cstring:
do the other way around :_)

regards
0
All Courses

From novice to tech pro — start learning today.