You’ve just recompiled a 3rd party library in Visual Studio, copied the .lib file into a proper directory, added dependencies into your final project… recompiled and it worked nicely! Good. So now you can commit the changes into the main repository.
Then, unfortunately, you got a report from a build server (or from your colleague) that your recent change generated 10s of warning messages about some missing files from this new library… why is that?
When you write:
char strA[] = "Hexlo World!"; strA[2] = 'l'; Everything works as expected. But what about:
char *strP = "Hexlo World!"; strP[2] = 'l'; Do you think it will work correctly? If you are not sure, then I guess, you might be interested in the rest of article.
Include Guards, Pragma Once, Predeclarations and other hints that might be useful when dealing with includes.
What can we do with file including in C++? Do we need to put all the other header files of the project (plus third party libraries) in every file all the time? For sure there have to be some rules to manage that issue properly.