To both posters above: the correct preprocessor macro is _CRT_SECURE_NO_WARNINGS (with a leading underscore). If you #define CRT_SECURE_NO_WARNINGS, you are probably not enabling the secure functions you think you are! (Yet another reason why preprocessor macros are "evil"...)