I am converting an old C program into modern C, due to the fact that certain errors occur that did not occur in previous versions of gcc. Here is an example of code that occurs quite frequently in this, causing this error to occur:
error: call of overloaded ‘stoi(std::__cxx11::string)’ is ambiguous
Here is the code:
std::string str;
std::getline(ins, str, ''); //ins is type std::istream&
num = stoi(str); //This one fails
I checked various sources and none of them describe why this occurs, so I am confused.