so if we declare and define a struct before main and want to use this struct in other file which are in the same root as this one, do we need to declare it again in that file? Especially I want to share the memory of a array whose element is the struct so I need to use the shm_get in another file, do I need to declare those struct again?
btw, is it in C
code will be like this:
 typedef struct {
 char y1;
 char y2;
 char y3;
 int x;
 } itemB;
int main(){...
itemB* BufferB;
then i share the memory
shmem2 = shm_get(542421, (void**)&BufferB, 30*sizeof(itemB));
so if i write another file which want to share the BufferB, I know should declare one more time BufferB and call the shm_get again use the same initial key, but should I declare a struct one more time? and where?