0
How to make an array of strings?
Please, explain me how to do an array of strings on CPP
1 Answer
+ 4
For older arrays:
https://stackoverflow.com/questions/1088622/how-do-i-create-an-array-of-strings-in-c
For "newer" arrays (C++ style), you can use the <vector> header:
std::vector<std::string> arr;
Reference for <vector> is here:
http://www.cplusplus.com/reference/vector/vector/
But the simplest way would probably be:
std::string arr[] = { "Test", "Test" };