Memory allocation in header files
问题 The company I'm working for have development rules for C development on embedded target. One is : It is recommended to not allocate any storage space in the header files. I'm not sure what it means, the person who wrote it is not around and the other developers don't really care, so I am asking here. What I understand is that I shouldn't declare variables in a header files, so something like that would be discouraged in a .h : int myVar; static char myOtherVar; What I don't understand is what