Ad
  • Custom User Avatar

    Exception occurs when the formatted string is not in the correct format (i.e, having leading or trailing spaces or non-digit characters)

    OP solved it, closing...

  • Default User Avatar

    Wondering the same thing I used stoi too. had a string variable add each sqaured number onto the string and return a stoi of that string. but I get error from an exception being caught. Not sure why this isn't allowed.