How linking happens for header file funxtion body
Hi I have understanding that .cpp file is compiled and it generates .obj file which is referred by linker to link function definition for each function call. Header file is just use to find function declaration. Now query is about function definition in header file itself... As it is not used by linker, how it work or function dedinition in header is not a way to achieve. My code base has a common header and few functions of this header is defined in one project and few are in other project... Now one more small function I am trying to add into header but it has to be inline and not related to either of these tqo existing projects Can i directly define in header and use this header as include in my peoject ? Dont i have to link this ? Only header include will be sufficient ?