I wrote some JavaScript code but now I want to translate it to C++ because of perfomance, but my knowledge of C++ is low.
In JavaScript I can do:
var arr=[[['à','á'],['è','é'],['ì','í'],['ò','ó'],['ù','ú']],['a','e','i','o','u']];
How can I do something like that in C++?
Must I do
vector<vector<char>> arr;
and then set each element manually?
arr[0][0]='à';
arr[0][1]='á';
...
Yes, it’s at least a bit more work unless you have C++11, which adds the possibility of constructors taking an initializer list:
You might also consider replacing
std::vector<char>withstd::string.