摘要: #include <iostream>using namespace std;class test{public: test(int a,...); ~test(); void setdata(); void showdata(); int **data; int *N; //存储每个参量的值 int n; //统计参量的个数};test::test(int a,...){ int *p=&a; n=0; while (*p!=0) { n++; p++; } data=new int... 阅读全文
posted @ 2012-09-11 14:35 Dsp Tian 阅读(416) 评论(0) 推荐(0) 编辑
摘要: /*va_list vl; //定义一个指向参数列表的变量(一个...指针)va_start(vl,first_param); //把指向参数列表的变量初始化va_arg(vl,mode); //获取下一个参数,参数类型由第二个参数指定,第二个参数用于在va_arg内部进行尺寸计算,以便找到下一个参数va_end(vl); //结束*/#include <iostream>#include <cstdarg> //头文件包含:C++ <cstdarg>; C <stdarg.h>using namespace std;void variable( 阅读全文
posted @ 2012-09-11 09:49 Dsp Tian 阅读(482) 评论(0) 推荐(0) 编辑