Most elegant way to share a C array
问题 I have to turn back to (embedded) C after some lengthy time with C++, and have the following problem: I have a source module which is included a lot of times, let's call it utilities.h and utilities.c In it, I have an important array, let's call it #define IMPORTANT_ARRAY_LENGTH 10000 char important_array[IMPORTANT_ARRAY_LENGTH]; I have a lot of other functions in this utilities module, and they all work fine. However, in one of the other source files, let's call it worker.c , I have to use