Converting string, to float (without atof) in C

I'm designing a function that will convert a string into a float. e.g. "45.5" = 45.5 I have this so far. But it doesn't seem to work. Keep in mind, we cannot use any C library functions like atoi...