Re: atof() and _tstof() in VC6.0

From: JoeKowalski (JoeKowalski_at_usa.com)
Date: 06/24/04


Date: Thu, 24 Jun 2004 15:55:23 +0200

Sorry, made some errors in my post, here is the message again:

Hello,

i'm converting a big MFC application to support UNICODE so it can be
translated into chinese/japanese.
The application is made with visual studio 6.0 and i want to be able to
compile it with and without the _UNICODE preprocessor definition.

For this i'm using the functions provided by TCHAR.H, e.g. i'm changing all
atoi(..) commands in _ttoi(..) commands so it will suport both _UNICODE and
single byte characters. With _UNICODE defined this will result in a
_wtoi()command, without _UNICODE defined this will result in a atoi()
command.

The problem i'm having is with atof(..), TCHAR.H doesn't provide a function
for it (yet) in Visual Studio 6.0 which supports both UNICODE and
non-UNICODE. In Visual Studio 7.x the function _tstof(..) does this which
is also
defined in the TCHAR.H file.

Do i need to upgrade to Visual Studio 7.x or can i download some package
which upgrades the TCHAR libraries?

The commands i would like to use can be found in this MSDN section and all
start with _tst or _tt:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/
_crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.
"JoeKowalski" <JoeKowalski@usa.com> wrote in message
news:40dacba6$0$42417$e4fe514c@news.xs4all.nl...
> Hello,
>
> i'm converting a big MFC application to support UNICODE so it can be
> translated into chinese/japanese.
> The application is made with visual studio 6.0 and i want to be able to
> compile it with and without the _UNICODE preprocessor definition.
>
> For this i'm using the functions provided by TCHAR.H, e.g. i'm changing
all
> atoi(..) commands in _wtoi(..) commands so it will suport both _UNICODE
and
> single byte characters.
>
> The problem i'm having is with atof(..), TCHAR.H doesn't provide a
function
> for it (yet) in Visual Studio 6.0 which supports both UNICODE and
> non-UNICODE. In Visual Studio 7.x the function _tstof(..) does this which
> is also
> defined in the
>
> Do i need to upgrade to Visual Studio 7.x or can i download some package
> which upgrades the TCHAR libraries?
>
> The commands i would like to use can be found in this MSDN section and all
> start with _tst or _tt:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/
> _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp
>
> Regards,
> Joe.
>
>