This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Declaring structure as extern

I am using a structure named my_struct which is to be declared as extern.

struct my_struct{
int a;
int b;
};

struct my_struct first;
struct my_struct second;

How do I declare the structure in the main file and use the structures first and second as extern in the other c files of the same project.

0