I\'ve defined a struct item
in a .h file. Now I\'m defining another struct tPCB
in another .h which is part of the same project, and I need the
Never ever put variable definitions (that is, allocating them) in a header file. That is bad for many different reasons, the two major ones being poor program design and floods of linker errors.
If you need to expose a variable globally (there are not many cases where you actually need to do that), then declare it as extern
in the h-file and allocate it in the corresponding C file.