I have question on string formatting.
It will crash at the line strCombine.Format("%ld000%s", a, "+0800"); when running on Microsoft visual studio 2010 but not in visual studio 2003 by using the exact same code.
Any idea why?
Code Snippet:
Code:
CString strCombine="";
time_t a = 150519836000;
strCombine.Format("%ld000%s", a, "+0800"); //crash at this line at VS2010 but not at VS2003
However if change to code as below, it will not crash at VS2010 anymore. Just curious why?
Code:
CString strCombine="";
time_t a = 150519836000;
strCombine.Format("%ld000", a); //after changing this line, it no longer crash anymore
strCombine= strCombine + "+0800";