??? 12/30/04 00:14 Read: times |
#84073 - Answer is wrong - in part Responding to: ???'s previous message |
Neil Kurzman said:
put Byte TEST[] = { (Byte)0x01, (Byte)0x02, (Byte)0x03 }; in a C module. Then put extern Byte TEST[]; in the header file. Andy Peters said:
..just make sure you don't include that header in the same file where you define the array. Otherwise you'll get compiler complaints about duplicate definitions or some such. No, that is wrong: it would be perfectly acceptable to include that header in the same file as the definition. In fact, I always recommend that you should include the header in the same file as the definition - because, that way, the compiler can give you a warning if the declaration doesn't match the definition. The important thing to note here is the distinction between a declaration and a definition http://www.8052.com/forum/read.phtml?id=58970 http://www.8052.com/forum/read.phtml?id=31298 |
Topic | Author | Date |
How to #define an array | 01/01/70 00:00 | |
not an array | 01/01/70 00:00 | |
if you really mean an array | 01/01/70 00:00 | |
Let me clarify myself a bit | 01/01/70 00:00 | |
extern | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
the space is the place ... | 01/01/70 00:00 | |
Answer is wrong - in part | 01/01/70 00:00 | |
you're correct, of course!![]() | 01/01/70 00:00 | |
memory spaces | 01/01/70 00:00 | |
Almost but not quite. | 01/01/70 00:00 | |
being sure | 01/01/70 00:00 | |
oh.. | 01/01/70 00:00 | |
Back to basics | 01/01/70 00:00 |