Hello.
In C I can do something like this:
char* words[] = { "foo", "bar", ... };
I was just wondering if there is a better way to do this with C++. I was thinking about using a vector of strings...
std::vector<string> v[] = { "foo", "bar", ... };
But this doesn't work, and I know the syntax is wrong as well. I haven't been able to find any examples on this so any help is much appreciated.
PS - is using a vector of strings the right approach to this? Or is there something better for a C++ equivilent?
Thank you in advance.