草庐IT

MyFormat

全部标签

c++ - 如何从类似函数调用具有可变数量参数的函数?

让我用下面的C++/MFC代码解释一下我的意思:staticCStringMyFormat(LPCTSTRpszFormat,...){CStrings;va_listargList;va_start(argList,pszFormat);s.FormatV(pszFormat,argList);va_end(argList);returns;}staticCStringMyFormat2(intarg1,LPCTSTRpszFormat,...){if(arg1==1){//HowtocallMyFormat()fromhere?returnMyFormat(pszFormat,..