Error while converting Str To Int

num1 is a string with digits

and n1 is integer

but im getting error while converting them ..

im trying to do .. string to integer

 
  n1=stoi(num1);


if i comment the line .. the code works..
Topic archived. No new replies allowed.