Hi guys.I have a quuestion.I can't understand exactly library files and header files.For example, thanks to stdio.h file I can use printf function but where is the the source of printf() function? I think that stdio.h includes only the protype of printf function..
Similarly,İf I define a header file for a function and the source file which include this function implementation,Should I create a library file to store source file and header file for my writing files.
In GCC it is in glib library linked to any C and C++ program.
Library file is an already compiled source file. It have paired header file which provides access to library functions (and do stuff like specify calling conventions to make sure that different compilers will get function call right)
In most cases you should not bother with making a library from your cpp files. Only if you have something which often used in different projects and have a noticeable compile time you should probably make it.