Boost logo

Boost :

Subject: Re: [boost] Proposed templated integer_sort
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-18 16:23:01


AMDG

Steven Ross wrote:
> I'm using #ifdef MSVC to set MAX_SPLITS to a different value on Windows
> MSVC.
>
> I'm currently working on making my samples run cleanly without warnings on
> Windows. fopen gives warnings in MSVC (see below), and I've run into file
> I/O errors on Windows (which do not occur on Linux). Here are some Windows
> compile warnings with fopen:
>
> samples\alreadysorted.cpp(34) : warning C4996: 'fopen': This function or
> variable may be unsafe. Consider using fopen_s instead. To disable
> deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
> C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\INCLUDE\stdio.h(234) : see declaration of 'fopen'
> samples\alreadysorted.cpp(65) : warning C4996: 'fopen': This function or
> variable may be unsafe. Consider using fopen_s instead. To disable
> deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
> C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\INCLUDE\stdio.h(234) : see declaration of 'fopen'
> samples\alreadysorted.cpp(67) : warning C4996: 'fopen': This function or
> variable may be unsafe. Consider using fopen_s instead. To disable
> deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
> C:\Program Files (x86)\Microsoft Visual Studio
> 8\VC\INCLUDE\stdio.h(234) : see declaration of 'fopen'
>
> What is the best platform-independent file I/O approach to use for writing
> and reading bytes? ofstream writes 4031 bytes when I tell it to write 4000
> on Windows, so that doesn't seem appropriate.
>

Feel free to ignore these warnings.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk