So my basic idea for doing that was this kind of loop :
std::array<int,10> t{};
for (int k = t.size()-1; k >= 0; k--)
cout << t[k] << " ";
The problem is that the .size() method returns an std::array::size_type, which, from what i've read, could be larger than an int.
The problem is that size_type is unsigned, so when i do this :
for (auto k = t.size()-1; k >= 0; k--)
cout << t[k] << " ";
It just loops infinitely because k can't be negative. So how would you iterate an std::array or std::vector backwars using a size_type variable ?