I have a function that converts a char array to a float and then returns the float (thanks again to sunnycoder). For whatever reason the function is returning some strange number. Here's my code:
//rply.value is a char array in a struct
float t = atof(rply.value); //convert char array to float
printf("value: %f\n",t); //print out float value. correctly prints out value of 50.5
float p = returnFloatVar();
printf("value: %f\n",p); //prints out 134523168.00000
I'm probably doing something stupid, but I can't see it.