What you are asking is: is it possible to make an array of a size that is not known at compile time, but only at runtime? Yes, you can, but the way you have chosen is not standard C++: declaring an array like
struct node *arr[numOfLanding];
means using a "variable-length array", which is not (and has never been) part of the C++ standard. It was part of C, however, in C99, but then the committee decided to make it optional in C11. It is anyway possible to find a C++ compiler that supports this feature as an extension: gcc, for example. But if you use it, keep in mind that your code is not portable.
The standard way of doing it in C++ is to use new[]:
node* arr = new node[numOfLanding];
(note that using the keyword struct every time is what you would do in C; in C++ it is not required)
At this point, you access each element using the ., not the ->:
arr[i].hour=hour;
arr[i].minutes=minutes;
After you are finished using the array you have to delete it, by using:
delete[] arr;
Anyway, this style is old, and nowadays considered bad. The preferred approach is to use a container that automatically deals with the size for you, and that will manage memory so that you don't need to worry about new[] and delete[]. The best container for this is the std::vector. To use it, first you have to #include <vector>, and then you can use it like this:
std::vector<node> arr(numOfLanding);
for (auto& curr_node : arr) {
cin>>hour;
cin>>minutes;
curr_node.hour=hour;
curr_node.minutes=minutes;
}
std::vector<node> arr;.std::vector<node>.