I have seen some solutions in internet but I can't found solution to my problem.
I have it: char c[50]; and I would like memory in a float variable, for example float f; the number inside of C variable. for example, I have it in c variable
c[20]=5
c[21]=0
c[22]=.
c[23]=2
c[24]=3
I would like have a f value 50.23. That is to say. I want do it:
I belive isn't useful in my problem becouse its work if you have got a string. But I have got a chain with other things that not interest for my and I should separate the information of interest. I belive...
AWOL:
You've got a stupid encoding system or protocol?
True. It's just that he didn't say, so I was mentioning the an alternative in case he had consecutive values of a similar length without separating characters. (I'd probably use separating characters.)
AWOL:
So, get a string, and don't reinvent the wheel.
I need use a char array becouse I recive information from Sim chip and I need analyze this information character to character that is to say, i cant get a string.
Thanks, the atof(c+20) is useful for my case becouse after of last number I have blank space and this instruction get exactly the number that I want.
However I think do it:
K[0]=c[25];
K[1]=c[26];
........ and use atof(k), is more best than change de C array values,