Help me out in this problem
yup checking …
if(stoi(s.substr(index,2))<=26) //2nd argument is length instead of ending index
2nd argument in substr function is length of the string u want to extract
and not the ending index
For example
s=“abcde”
here s.substr(2,1) == “c”
s.substr(2,2)==“cd”
s.substr(2,3) ==“cde”
u used index +2 as second argument
I already corrected it
if(stoi(s.substr(index,2))<=26)