Possible Duplicate:
Passing Variable Number of Arguments with different type - C++
I have a function that takes n arguments.
And I want to call it like, function_name(number_args - 1, input, args_from_console[], output)
How do I do that?
*the function that takes n arguments already is written and works... I just don't want to hard code the variables being passed in.
Edit: (adding code)
struct fann *ann = fann_create_standard(num_layers,
Config::NUMBER_OF_INPUT_NEURONS,
Config::WIDTH_IN_BITS,
Config::WIDTH_IN_BITS,
Config::NUMBER_OF_OUTPUT_NEURONS);
the function above can have at least 3 arguments... the required arguments are num_layers, num_input, and num_output)
the optional arguments are the hidden layers of the neural network (what they are call isn't important.... but basically... it could look like this:
fann_create_standard(#layers, #input, #hidden1, #hidden2, #hidden3, #hidden4, ... #output);
what I want to be able to do, is pass in command line arguments to change how many layers, and what the values of each of the hidden layers are (the middle arguments in this function call), so that I don't have to re-compile the program every time I want to re-configure the network.