17.5 — Arrays of references via std::reference_wrapper
In the prior lesson, we mentioned that arrays can have elements of any object type. This includes objects with fundamental types (e.g. int) and objects with compound types (e.g. pointer to int). #include <array> #include <iostream> #include <vector> int main() { int x { 1 }; int y { 2 …