Can't convert string into float/double

后端 未结 2 458
我在风中等你
我在风中等你 2021-01-29 06:03

I\'m writing a code for class where I take in input from a huge file (~850 lines) of data separated by commas. what I have so far is:

#include 
         


        
2条回答
  •  长发绾君心
    2021-01-29 06:31

    Tray this:

    //this can be cause exeptions
    Entry[i].Elevation = atof (Data[((i*10) + 2)].c_str());
    

    NOTE: include cstdlib

提交回复
热议问题