Exception when comparing an (int)double and (int)int [duplicate]
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.
精彩评论