how we formulated conversion of string to numbers in this
Can you please exlain
for(int i=0;i<str.size();i++)
{
sum=sum*10+str[i]-‘0’;
}
how we formulated conversion of string to numbers in this
for(int i=0;i<str.size();i++)
{
sum=sum*10+str[i]-‘0’;
}