If you want to be able to initialize a whole sub-array like that with {"first", "second"}, you most likely would need to use a std::vector or std::array instead of manually allocating the memory for the array. Unless you have very specific reasons for using pointers, here is how it could look with vectors:
using str_vec = std::vector<std::string>;
std::vector<str_vec> v(3, str_vec(2, ""));
v[0] = {"first", "second"};
But if you really need pointers, then you'll have to first allocate the memory for the "row" and then do separate allocations for each "column":
std::string** a = new std::string*[3];
for(int i = 0; i < 3; ++i) {
a[i] = new std::string[2];
}
After which you can fill the values one by one:
a[0][0] = "first";
a[0][1] = "second";
And don't forget about deleting all these arrays after you are done. In the reverse order, you first need to delete all columns and then the "row":
for(int i = 0; i < 3; ++i) {
delete[] a[i];
}
delete[] a;
std::array<std::arrayr<std::string,2>,3> arr;new string()