//strtod is converting the string to double, then assign the array's values //strtod has an input char pointer, so we should convert "line" which is the string object to char array using c_str() ...
Copy convertutils.h and convertutils.cpp to your project. #include "convertutils.h" Invoke APIs in namespace cx, as follows: // Convert a string to Int32 value. std::cout << cx::to_int32("1234") << ...