Hi all. I'm having a problem with compiling my program because i want to use the same array inboth my main c file and my other c file.
Example: main.c
#include <absacc.h> #include <stdio.h> #include <SPI.h> #include <DS1305.h> #include <SDcard.h>
unsigned char rdat[12]; //To be used in main.c and SDcard.c
However if i declare it in both i get an error: Multiple public definitions and if i declare it in only 1 of the two the compiler thinks that the array is undefined in one of them.
Please help me out. Can i solve this problem by defining the array in the SDcard.h file instead or any other solutions??/
You should definitely get a good book about the C language. This will not be your only basic C question. Better to have a book available, since it can not only answer any questions you have, but can also teach you quite a number of things you didn\t even know that you needed to know...