I have many header files and source codes for my project in C++. I wanted to suppress warnings, therefore, came to know about #pragma warning preprocessor. I am able to suppress one kind of warning, namely 4251, by putting #pragma warning(push) #pragma warning(disable:4251) ...some declarations/prototypes #pragma warning(pop)
in the header file (utils.h) of the corresponding source file(utils.cpp), where this warning have been shown.
Now, there is another kind of warning (4146), which is occurring in my source file, clah.cpp. I am putting the same code, as mentioned, to the header file of this file (clahe.h). However, the compiler is not able to suppress this warning ? Can you please tell me if I am doing somewhere a mistake ? or, I am putting the pragma statements wrongly ? Thanks.
P.S., I am a beginner in C++.