I am in the process of learning c++. So i know a method by which you send something to function and then work as if it was call by value but actually it is call by reference
Confusingly, a function parameter that looks like an array City p[] is actually a pointer, equivalent to City * p. So you can just pass a pointer to your dynamic array:
list_cities(number, p);
That said, prefer friendly types like std::vector so you don't have to juggle pointers and carefully avoid memory leaks and worse.