In a function that takes several arguments of the same type, how can we guarantee that the caller doesn't mess up the ordering?
void allocate_things(int num_buffers, int pages_per_buffer, int default_value ...
// uhmm.. lets see which was which uhh..
A typical solution is to put the parameters in a structure, with named fields.
AllocateParams p; p.num_buffers = 1; p.pages_per_buffer = 10; p.default_value = 93; allocate_things(p);
You don't have to use fields, of course. You can use member functions or whatever you like.