开发者

Exception when comparing an (int)double and (int)int [duplicate]

开发者 https://www.devze.com 2023-03-05 23:00 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: 开发者_JAVA技巧 Exception when comparing an (int)double and (int)int
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

开发者_JAVA技巧 Exception when comparing an (int)double and (int)int

IGNORE THIS POST. ACCIDENTLY REPOSTED

Sorry


if((int)time >= 600){   time_s.insert(4, sec);

should be,

if((int)time >= 600){   time_s.insert(3, sec);  // digit 3 instead of 4

From your code, I suppose the string size is 6 characters (0 to 4 and 5th character as nul). Inserting 2 digit at 4th position and 5th position would overwrite nul.

Do cross verify, as I have made a guess seeing your code.

0

精彩评论

暂无评论...
验证码 换一张
取 消