可变参数列表之va_copy
2013-01-16 23:18:34
分类: C/C++
把Linux下的程序移植到vc 6上,有不支持va_copy的报错为“undefined reference to
va_copy”,查阅了许多资料,最终在国外找到了说明。 va_copy is c99 - anything before that, and its upto the compiler... as pointed out, gcc 2.95 dosnt have it,depends on your definition of absolutely ancient, but the gcc 2.95.4 that comes with freebsd 4.x does not support va_copy C99中对其进行了支持。但是如果不支持怎么办? 如下定义可以解决问题: 代码:
这个是照抄别人的。 |
|