C++, Wondering why making this var static makes it passable to my function

Viewed 41

I apologize for the odd description.

class test {
public:
    const int x = 10;
    int func(int arr[][x], int size);
private:
};

the above is not allowed. However, what I have below is totally fine. What does making it static change?

class test {
public:
    static const int x = 10;
    int func(int arr[][x], int size);
private:
};
0 Answers
Related