Hello,
I'm currently working on a project that needs useage of extern const variables, however i get the error; "error C2370: 'x' : redefinition; different storage class". so i wrote up a test to see if i could get any progress with it. However i couldnt.
Header file:
1 2 3 4 5 6 7 8 9 10 11 12
#if !defined(__TEST_H)
#define __TEST_H
externconstint x = 10;
int Test[x];
#endif
you use x in class Test, class is an object which can not have external information (at least in theory). User of a class must not know how class works and class variables.