Reedbeta
11-14-2007, 04:07 PM
Okay, I'm sure I'm just missing something completely obvious here, but I cannot figure out why this does not work.
data.cpp:
const unsigned char data[] = { 1, 2, 3, 4};
main.cpp:
extern const unsigned char data[];
int main (int argc, char **argv)
{
return data[0];
}
When I put these files into a new project in Visual C++ 7.1 and compile, 'data' is reported as an unresolved external. What am I doing wrong?! :wallbash:
data.cpp:
const unsigned char data[] = { 1, 2, 3, 4};
main.cpp:
extern const unsigned char data[];
int main (int argc, char **argv)
{
return data[0];
}
When I put these files into a new project in Visual C++ 7.1 and compile, 'data' is reported as an unresolved external. What am I doing wrong?! :wallbash: