/****************************************************************************** * This program determines the last element of an array. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; static const vector VALUES = {1, 3, 5, 7, 9}; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); int const VALUE_SIZE = VALUES.size(); wcout << L"Array size is: " << VALUE_SIZE << endl; wcout << L"Last element is: " << VALUES[VALUE_SIZE - 1] << endl; return 0; }