I am new to C++ and am having an issue converting a signed char to a double. Initial idea was to convert the signed char to a const char* and use atof to return the double.
signed char x = '100';
const char * cChar = x;
std::cout << atof(cChar);
What can I try to resolve this?
'100'is wrong – you need either aconst char * x = "100";or achar x=100;