I declared and initialized a constant char array inside the class:
class grid {
const char test[11] = {'s', 'e', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
My code works, but I keep getting compiler warnings:
non-stationary data element initializers available only with C ++ 11
and
extended initializer lists are only available with C ++ 11
I know this is not a problem , because I am compiling the C ++ 11 standard, but I'm wondering what pre C ++ 11 is about my code.
I hope someone can give me some insight and suggest what I can do to make this C ++ 98 code “friendly”.
Also as requested by my compiler command:
> g++ -o test main.cpp
source
share