I have to convert this to a float value
like float n=12.3
How can I convert characters to float value?
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Feb 27, 2013 11:30 pm
Look at the atof() function in the CCS manual. This function requires a
string as the input, so your ascii float array must have a 0x00 byte at
the end of the numbers. This makes it into a C string. Example:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum