I\'m a moderately experienced Java / C# programmer, and I\'ve recently started learning C++. The problem is, I\'m having trouble understanding how to structure the various heade
you might want to know why compilation and linking are seperate as well (since i dont see any posts explaining it, and it is the cause of a lot of confusion not knowing the underlying reasons of things).
Linking and compiling is completed seperately because (and there might be more than one reason) of the need to do library calls. if you defined or any of its ilk, the code implementing the function prototypes in those headers are part of the libary that is already compiled and sitting as object code somewhere. if a giant compilation process were to be used instead, you'd need to have the source for those library calls, as well as more time during compile because you'd be also compiling the library code.