TechnologY

atof – Convert string to double

double atof ( const char * str ); Convert string to double Parses the C string str interpreting its content as a floating point number and returns its value as a double. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes as many characters… Continue reading atof – Convert string to double

TechnologY

Why can’t char** be the return type of the following function

I have the following function in C++ : char** f() {     char (*v)[10] = new char[5][10];     return v; } Visual studio 2008 says the following: error C2440: ‘return’ : cannot convert from ‘char (*)[10]’ to ‘char **’ What exactly should the return type to be, in order for this function to… Continue reading Why can’t char** be the return type of the following function