I'm trying to create a 2D Ragged Array and I want to use initializer lists without them being nested, but for some reason it won't compile.
I'm attempting:
char[][] symbols = new char[4][];
symbols[0] = {'c', 'm', 'j'};
symbols[1] = {'c', '#', '?', 'w'};
symbols[2] = {'R'};
symbols[3] = {'?', '@'};
First line is okay, but it points me to the first bracket and states:
illegal start of expression
Anyone have any suggestions?
I'm attempting:
char[][] symbols = new char[4][];
symbols[0] = {'c', 'm', 'j'};
symbols[1] = {'c', '#', '?', 'w'};
symbols[2] = {'R'};
symbols[3] = {'?', '@'};
First line is okay, but it points me to the first bracket and states:
illegal start of expression
Anyone have any suggestions?