Is there a way to extend one really big array from header file to source file, and use his elements in main program?
array like this
BYTE codes[95][8] = {
255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 134, 255, 255, 255, 255, 255,
255, 143, 255, 143, 255, 255, 255, 255,
235, 128, 235, 143, 235, 255, 255, 255,
237, 213, 128, 213, 219, 255, 255, 255,
157, 155, 247, 226, 220, 255, 255, 255,
201, 112, 170, 221, 250, 255, 255, 255,
255, 175, 129, 255, 255, 255, 255, 255,
255, 227, 221, 190, 255, 255, 255, 255,
255, 190, 221, 227, 255, 255, 255, 255,
235, 247, 193, 247, 235, 255, 255, 255,
247, 247, 193, 247, 247, 255, 255, 255,
255, 250, 249, 255, 255, 255, 255, 255,
247, 247, 247, 247, 247, 255, 255, 255,
255, 252, 252, 255, 255, 255, 255, 255,
253, 251, 247, 239, 223, 255, 255, 255,
193, 186, 182, 174, 193, 255, 255, 255,
255, 222, 128, 254, 255, 255, 255, 255,
222, 188, 186, 182, 206, 255, 255, 255,
189, 190, 174, 150, 185, 255, 255, 255,
};
What is
If I understood correctly, you want to access the
codesarray from the source file. For that you need to#includethe header file to the source file and make use of the arraycodes. Remember, it will be in global scope (if that matters).Having said that, as metioned in the other answer by Mr. Lundin the best approach is to
#includethe header file in all the source files and make use of the variable.