0

How to make an array of strings?

Please, explain me how to do an array of strings on CPP

14th Jul 2018, 9:31 PM
Ricardo Natera
1 Respuesta
+ 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" };
14th Jul 2018, 9:52 PM
Shadow
Shadow - avatar