123
void usernamearray(){ const wchar_t names [1][3] ={{"0x56","0x45","0x52"}}; cout << names[1][2]<<endl;
const wchar_t names [1][3] = { {'a', 'b', 'c'} };
12345678
#include <iostream> #include <string> #include <vector> void usernamearray(){ const vector<string> names [3] = {"0x56","0x45","0x52"}; cout << names[1][2]<<endl; }
123456789
#include <iostream> int main() { const wchar_t names[1][3] = { { '\x56', '\x45', '\x52' } }; for (unsigned i = 0; i < 3; ++i) std::wcout << names[0][i] << '\n'; // names[1][2] is outside the bounds of the array. }