I need to pass array of structures to a function and I make it this way:
it's my function
void ShowRoutes(Route *routeList, int n, string title) { //... }
and it's function call
ShowRoutes(routeList, n, "Unsorted list: ");
but I would like to know are there other ways to pass array of structures to function?
std::arrayorstd::vector, depending on when you know the size.std::arrayorstd::vectoryet.