How do I default initialize a member array in C++11? It seems that I have to provide a bound.
class Example {
const char* num2letter[10]{" ", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
};
Compiles fine. But if I omit the bound then I got a compiler error:
error: too many initializers for 'const char* [0]' const char* num2letter[]{" ", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
How come the compiler cannot infer the bound as normally it can for local array definition using aggregate initialization?