Can anyone help me with a way of converting String to double in vc++?
I can't use atoi
, since it converts char to double. But I am using istringstream
.
std::istringstream stm;
double d;
String name = "32.67";
stm.str(name);
stm >>d;
It will give a compilation error:
error C2664: 'void std::basic_istringstream::str(const std::basic_string &)' : cannot convert parameter 1 from 'System::String ^' to 'const std::basic_string &'
Please help with different solution or correct this.