Please help advise what #include/library i can add to the first lines, I think “size” is not yet readable because I lack declared libraries.
Ok I found the video.
std::size() would not work for those arrays.
You can use
int second[sizeof(first) / sizeof(first)];
This would assign the same size to the second array. No extra header files are needed. If it is a different
size() implementation, then mention the video so that I can look up for it.
I checked that the implementation is correct. Check compiler version of Code::Blocks. It should be C++17 or higher.
If the version is C++17 and it is still not working, then add