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.
I think std::size()
would not work for those arrays.
You can use
int second[sizeof(first) / sizeof(first[0])];
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 <iterator>
header.
thanks for the help
I cant seem to find what version codeblocks uses so I’m going to look for a different compiler that I know uses the right version.
thanks