I have written the following statements:
CString strResult;
std::string errorReason("no this item");
strResult.Format("the error reason is: %s", errorReason);
It seems that it could not format the std::string object correctly; However, if I just replace std::string as CStirng, then strResult could format correctly.
Why va_arg
could support CStirng
, instead of std::string
?
Thanks