这是C语言中不定长参数的引用,va_list是参数列表,va_start是参数起始,另一个当然是中止了,下面是一个例子: inline string IToStr(const string fmt,...) //the function transmit the int or float and others to string ,and have vary parameters, but can not pass { char buff[BUFFLEN]; string strTmp; va_list para; //Get all parameters , if the number of parameter big than 10, the functing only take 10 ahead va_start(para, fmt);
inline string IToStr(const string fmt,...)
//the function transmit the int or float and others to string ,and have vary parameters, but can not pass
{
char buff[BUFFLEN];
string strTmp;
va_list para; //Get all parameters , if the number of parameter big than 10, the functing only take 10 ahead
va_start(para, fmt);
memset(buff,0,sizeof(buff));
sprintf(buff,fmt.c_str(), para);
strTmp = buff ;
va_end(para); return strTmp;
}*/
但是在C++中已经不建议使用,可能使支持已经不太好了
将“流氓无赖”测试到底
——始于2003年7月
天际白云匆匆去,银烛成灰心存泪;
孤苦孑然了一身,奔波劳苦鬓将白;
树梢蚂蚱凭空望,江边浪花碎巨石; 支持“流金岁月”!!!
发送框,少个“右键菜单,选择粘贴”;
再来个快捷键就更好了。
——2003年12月24日am
大家工资该发的发,帖子该结的结!
让我们回家过个开心年吧!!!^@^