Best C++ Function Prototype
Hi,
I'm working on improving my C++ skills. I'm porting over a Python library I wrote to C++. There's a function in the library, and I'm wondering how best to represent the function's arguments in C++. I'm just getting started with templates, and I think they might be part of an ideal solution.
So, how should the following pseudo-function prototype:
Code:
func( type_a arg_a, type_b arg_b, int arg_c, type_d arg_d, type_e arg_e, type_f arg_f, int arg_g=8 );
//type_a = NULL, SDL_Surface*, float*, double*, unsigned char*, char*, std::string, std::string*
//type_b = int, int*
//type_d = int, bool
//type_e = int, bool
//type_f = NULL, int*
...be written in C++? Note also that I need to know what type the arguments are in order to process them.
Thanks,
Ian