Code:
#include<iostream>
using namespace std;
class Values
{
static const int scSize = 100;
static const float scTable[] = {1.1, 2.2, 3.3, 4.4 };
static const char scLetters[] = {'a', 'b', 'c', 'd', 'e','f', 'g', 'h', 'i', 'j'};
static int size;
static float table[4];
static char letters[10];
};
int Values::size = 100;
float Values::table[4] = {1.1, 2.2, 3.3, 4.4};
char Values::letters[10] = {'a', 'b', 'c', 'd', 'e','f', 'g', 'h', 'i', 'j'};
int main()
{
Values v;
}
i tried to compile the above code, in the definition of static const arrays inside the class
i get error - brace enclosed initializer is not allowed here