December 22nd, 2012, 07:24 PM
Where to put #define _CRT_SECURE_NO_WARNINGS?
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?
Last edited by joeu2004; December 23rd, 2012 at 01:52 AM.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.