Details
-
Bug
-
Resolution: Incomplete
-
P4: Low
-
None
-
2.8.1 (rev.06)
-
None
-
Linux version 4.15.0-173-generic (buildd@lcy02-amd64-094) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #182-Ubuntu SMP Fri Mar 18 15:53:46 UTC 2022
Qt Creator 4.6.2
Qt 5.11.1 (GCC 5.3.1 20160406 (RedHat 5.3.1-6), 64bit)
Description
string vvv = "a1"; //如果vvv="" 同样 stoi 会崩溃
int nn1 = 0;
int nn2 = 0;
nn1 = atoi(vvv.c_str());
nn2 = stoi(vvv);
当执行到 stoi 的时候程序会崩溃,不知道这是不是正常情况,但是 atoi 就是好的