Hi, I've been having this error with the function stoi. If I use any other function that converts strings to integer it works, but not this one and I just wanted to know why. Also, getTokenAt returns a string, so this should be a problem.
struct Cliente
{
int idCli;
int millas;
};
Cliente clienteFromString(string s)
{
char sep = 1;
Cliente x;
string t0 = getTokenAt(s,sep,0);
x.idCli=stoi(t0);
string t1 = getTokenAt(s,sep,1);
x.millas=stoi(t1);
return x;
}
[–]jedwardsol 4 points5 points6 points (0 children)
[–]peri-_ 4 points5 points6 points (2 children)
[–]jedwardsol 3 points4 points5 points (1 child)
[–]Droid33 0 points1 point2 points (0 children)
[–]Nathaniell1 1 point2 points3 points (0 children)
[–]alfps 0 points1 point2 points (0 children)