const char * str; int kolich = help.size(); double znachen(0.0); for(size_t i(0); i <= help.size(); i++) { str = help[i]; znachen += atof(str) * pow(10.0, kolich); kolich--; } return znachen; This function takes a vector of type char and returns a number. Each cell of the vector stores one digit. To convert from char to double, I use the atof function. But it takes const char * as an argument. And then there is an error and a question. How does my char element make const char *?
str = &(help[i]);- Sublihimstd::stringinstead ofstd::vectorand the functionstd::stod. - αλεχολυτi <= help.size()- oh, something is wrong with the condition :) - Sublihim