- Code: Select all • Expand view
string mystrings[3]; // a local array: fixed size, non-fixed values
array<string> mystrings; // a dynamic array: non-fixed size, non-fixed values
static const string mystrings[] = { "foo", "bar", "um" }; //a static constant array: fixed size, fixed values
However, just today I found out that this is a valid declaration:
- Code: Select all • Expand view
array<string> mystrings[3];
What is this? It's not local because you can't use mystrings[0] = "Foo" to set its value, but it also doesn't support Push() or anything like that.
Is this an oversight?