![]() |
| ||
| converting string[][] to float[] I am trying to convert some data that I read in file as string data to a float array The data that is read are in two dimensional string array like char tmatrix[10][100]; Now I need to convert the content of tmatrix[][] into a float array so that float_array[1]=0.5 |
| ||
| Re: converting string[][] to float[] No problem -- just call atof() float n = atof(tmatrix[i]); Not a perfrect solution, but works ok for most purposes. |
| ||
| Re: converting string[][] to float[] Thanks a lot :D |
| ||
| Re: converting string[][] to float[] strtod() would be a better function to use, because it has better error diagnostics. |
| All times are GMT -4. The time now is 4:11 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC