开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜