Debug Error -Abort() Has Been Called

前端 未结 3 1035
难免孤独
难免孤独 2021-02-13 13:33

I\'m trying to enter a number,n and get the least super lucky number that is more than or equal to n. Super lucky: it\'s decimal representation contains equal amount of digits

3条回答
  •  故里飘歌
    2021-02-13 13:57

    On the first call to superLucky, you pass an empty string to std::stoi. When unable to perform the conversion, stoi throws an exception. That exception is not caught, so uncaught_exception gets called, which in turn calls abort

提交回复
热议问题