you could use the suggested solution above, otherwise, if you would like to stick to c - strings, heres what to do (i think this is what you want):
//first [] is the amount of strings (given a value at compile time, i think).//[80] is the possible/allocated length for each string in the array.char text[][80] = { "Hello " , "world! " , "My " , "name is" , "Reegan!" ,};
Then, you can access those strings in the 2d array above by doing the following:
std::cout << text[0] << std::endl; //string 0 = Hellostd::cout << text[1] << std::endl; // string 1 = World!std::cout << text[2] << std::endl; // string 2 = Mystd::cout << text[3] << std::endl; // and so on ...std::cout << text[4] << std::endl; // ...
i might not being doing it right, but give it a go (i dont often use 2d arrays)
Hope that helps!
~Reegan
EDIT: Confirmed, i just tested the code and it works for me.