First header file
//status.h file
static int A[2] = {1,2};
And another header file
//anotherfile.h file
#include "status.h"
int GETID()
{
return A[1];
}
I keep getting error when I compile saying A is undeclared identifier. I tried to define A as extern const int and still it did not help. In my IDE (VS2010) I can actually see the content of A when I hover over A value under GETID().
I want to use A as a global array because in my real program, A is an array contains 250 elements and I don't want to declare it more than one place in my program. What can I do in this case to make use of the array A in another header file?
Edit: A does not belong to any class where GETID() is a class function.