C string to float conversion
<p>I need to convert a string such as "3.456" to a float without atof() or any other string manipulation functions.  Below is my code that works for a c string to int conversion but obviously does not work with a float because of the period.  What do I need to add to deal with the period? Thank you.</p>

<pre><code>#include &lt;stdio.h&gt;

int size;
char string[] = "345";
int result = 0;
int i = 0;

int findLength(char string[]){

for(size = 0; string[size]!='\0'; size++){

 }
return size;
};

void conversion(char string[]){

result = result * 10 + ( string[i] - '0' );
if (i &lt; size - 1) {
i++;
conversion(string);
 }
}

int main(int argc, const char * argv[]) {
findLength(string);
conversion(string);
printf("%d\n", result);
return 0;
}
</code></pre>