symbian 下 不定参数的函数
来源:互联网 发布:易语言ftp源码 编辑:程序博客网 时间:2024/04/19 07:22
e32def.h contains the va_list, va_start and va_end macros.
// Definition
int math (const OperatorType ty ...)
{
va_list ap; // param list
va_start(ap,ty); // where to start in the list i.e. after ty
int x = va_arg(ap,int); // go through the parameters, which are ints
int res = 0;
while (0!=x) // while not zero
{
switch (ty)
{
case ADD: // other cases, e.g. SUBTRACT, not used
default:
res+=x;
}
x = va_arg(ap,int); // Get next param
}
va_end(ap); // clean up the stack frame
return res;
}
// Called
int r = math(ADD,1,2,3,4,5);
- symbian 下 不定参数的函数
- C/C++下不定参数的函数的实现
- c 不定参数的函数
- 不定数量参数的函数
- Java函数的不定参数
- 参数数目不定的函数
- 不定参数的宏 函数
- 不定参数函数的实现
- 不定参数函数调用不定参数函数
- 怎样实现数目不定的函数参数
- 函数不定量的参数问题
- 怎样实现数目不定的函数参数
- 不定参数个数的C函数-
- 2.不定个数参数的函数写法
- 不定长参数函数的实现
- 如何实现参数个数不定的函数?
- 不定参数函数的运用与实现
- 传不定个数参数的函数写法
- POJ 1167 解题报告
- SubVersion服务器端配置
- Windows对象、句柄与MFC对象
- RFID系统修改说明-090805
- 网关的作用
- symbian 下 不定参数的函数
- 福娃免费空间
- exception
- 开博客
- ProeWildfire 4.0破解、乱码、许可证问题的解决
- 正式开博啦^_^
- (转载)浅谈单元测试
- C语言专题——格式化I/O详解
- 开机自动运行的位置和木马运行方式