I routinely compile with #define _CRT_SECURE_NO_WARNINGS.
When I put before the first #include in my main (and only) module, I get a compile-time warning or error. (I don't rememeber which.)
But it works fine if I put that directive after the #pragma once directive in the stdafx.h file.
The two approaches should be identical insofar as the order in which the compiler sees the lines of code.
Must I really put #define _CRT_SECURE_NO_WARNINGS into stdafx.h (or the first #include'd file, which is stdafx.h for me)?
Or am I doing something inexplicably incorrect when I put #define _CRT_SECURE_NO_WARNINGS into my main (and only) module?
When I put before the first #include in my main (and only) module, I get a compile-time warning or error. (I don't rememeber which.)
But it works fine if I put that directive after the #pragma once directive in the stdafx.h file.
The two approaches should be identical insofar as the order in which the compiler sees the lines of code.
Must I really put #define _CRT_SECURE_NO_WARNINGS into stdafx.h (or the first #include'd file, which is stdafx.h for me)?
Or am I doing something inexplicably incorrect when I put #define _CRT_SECURE_NO_WARNINGS into my main (and only) module?