Why is it so very few people on this list ask questions with enough
information for us to be able to answer them?

Exactly how do you want to map a decimal value to an unsigned char?
0.01 => 'a', 0.02 => 'b', or something seemingly useless like that?  If
you want to map numbers between 0 and 1 to 256 different characters,
you're going to have to tell us how you want to do the mapping.  Is it
merely breaking up the range into 256 equal parts?  

Or do you want to map your number into a string, so that 0.01 => "0.01",
which is done with a plain ordinary sprintf() function.  

RobR, wrestling with Crystal Reports all day, therefore feeling very
crabby


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Jos Timanta Tarigan
Sent: Wednesday, September 01, 2010 4:57 PM
To: [email protected]
Subject: [c-prog] float value to (unsigned) char

hi, 

im trying to convert a decimal value from 0-1 to unsigned char. so since
there are 256 value of unsigned char. how can i do that? i mean since
you can only define unsigned char with 'a' or '@' which is not a math
value, how can i convert those 0-1 decimal to unsigned char character?

thanks in advance

 =================================
http://www.svnstrk.blogspot.com

 


      

[Non-text portions of this message have been removed]



------------------------------------

To unsubscribe, send a blank message to
<mailto:[email protected]>.Yahoo! Groups Links



Reply via email to