> Record rec[10];
Isn't it just
std::array<Record, 10> a;
std::array - cppreference.com
> Record rec[10];
Isn't it just
std::array<Record, 10> a;
std::array - cppreference.com
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.