int fHandle = FileOpen("TradeSeries.CSV",FILE_READ |FILE_CSV,","); FileSeek(fHandle,0,SEEK_SET); //beginning of file string strEquity = FileReadString(fHandle); //read in equity amt as string double seriesEquity = StringToDouble(strEquity); //convert to number PrintFormat("The string '%s' is converted to the real number %.2f", strEquity, seriesEquity); //Prints The string 3733.31 is converted to the real number 0.00 //if I place a number in strEquity the conversion works string strEquity = "3733.31"; double seriesEquity = StringToDouble(strEquity); //convert to number PrintFormat("The string '%s' is converted to the real number %.2f", strEquity, seriesEquity); //Prints The string 3733.31 is converted to the real number 3733.31<pre lang="C++">
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)