c - Should the static and inline functions be defined in .h file? -


when write software in c, should put static , inline functions in .h or in .c file?

do not put declaration nor definition of static function (or variable) in .h file. defeats points of static - keeping functions/variables local.

inline matter - depends on scope meant function. inline function in .h meant global usage , scope. inline function in .c meant local usage only. same strategy used #define

inline functions can extern, static or unspecified. @christoph explains inline scope issues.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -