如何获得某个函数的所有参数类型?
如题:
举例 : int fun(int *a, float *b, double c);
取得 int *, float *, double
[解决办法]
int fun(int *a, float *b, double c);
int fun(int *a, float *b, int c);
这样的重载是存在,所以只凭 fun 是没有办法知道函数参数类型的。
如果没有这个顾虑,可以尝试使用模板。
发布时间: 2012-03-13 11:21:12 作者: rapoo
如何获得某个函数的所有参数类型?
如题:
举例 : int fun(int *a, float *b, double c);
取得 int *, float *, double
[解决办法]
int fun(int *a, float *b, double c);
int fun(int *a, float *b, int c);
这样的重载是存在,所以只凭 fun 是没有办法知道函数参数类型的。
如果没有这个顾虑,可以尝试使用模板。