Why can't fixed arrays be in class?

I

Immortal Nephi

I tried to put fixed array into class, but the C++ Compiler generates
an error as syntax error of '{'. I don't find anything wrong. Fixed
array is used to have a list of strings.

For example

class Test
{
public:
Test();
~Test();

private:
static const char List_Strings[5][10] =
{
"abc",
"def"
};
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,170
Messages
2,570,925
Members
47,466
Latest member
DrusillaYa

Latest Threads

Top