#include "typeConvert.h" // Converts a string (temp) to a float float charToFloat(char *temp) { int flag = 0; float ans = 0; int i, dec=0; for (i=0;i<(int)strlen(temp);i++) if(temp[i]=='.') dec = i; for (i=0;i<(int)strlen(temp);i++) { if(temp[i]==45) flag=1; if(temp[i]>=48 && temp[i]<=57) ans += pow((float)10,dec-i-1*(i=48 && temp[i]<=57) ans += (int)pow((float)10,(float)strlen(temp)-1-i)*(temp[i]-48); } if (flag) ans*=-1; return ans; } // Converts and integer num to a string of length len char* intToString(int num, int len) { int negative = 0; //int ans = 0; int i,j; float k; char *temp = new char[len+1]; if (num<0) negative=1; if (num<0) num*=-1; for (i=0; i=65 && s[i]<=90) s[i]+=32; } return s; }