c++ - Is "Multiple Include Guard" required for .cpp files? -
i have file1.h , file1.cpp in project. have multiple include guard in file1.h avoid multiple inclusions of same file. have include file1.h file in file1.cpp file. run third party tool (parasoft) find issues respect project, has identified multiple include guard missing in file1.cpp file. question required have multiple include guard in file1.cpp file? if not required why getting error in file*.cpp file? please me....
the usual cause of message #include "file1.cpp"
. say, accidentally included .cpp file instead of actual header.
the tool you're using correctly thinks if file1.cpp
included, should guarded against multiple inclusion. tool doesn't wonder whether file1.cpp
should have been included in first place.
Comments
Post a Comment