I have a data structure like this:
struct foo {
int id;
int route;
int backup_route;
int current_route;
}
and a
allows you to define variadic functions (which accept an indefinite number of arguments, like printf()). I would define a function which took an arbitrary number of pairs of arguments, one which specifies the property to be updated, and one which specifies the value. Use an enum or a string to specify the name of the property.