VC6.0中的atof()和_tstof() [英] atof() and _tstof() in VC6.0

查看:244
本文介绍了VC6.0中的atof()和_tstof()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在转换一个大的MFC应用程序以支持UNICODE,所以它可以是

翻译成中文/日文。

该应用程序是使用visual studio 6.0制作的,我希望能够使用和不使用_UNICODE预处理器定义来编译它。


为此,我使用TCHAR.H提供的功能,例如我在_wtoi(..)命令中更改了所有

atoi(..)命令,因此它将支持_UNICODE和

单字节字符。


我遇到的问题是atof(..),TCHAR.H在Visual Studio 6.0中没有为它提供一个函数

它支持UNICODE和

非UNICODE。在Visual Studio 7.x中,函数_tstof(..)执行此操作

也是

定义在


中我需要升级到Visual Studio 7.x或者我可以下载一些软件包

升级TCHAR库吗?


我想要使用的命令可以可以在这个MSDN部分找到,所有

都以_tst或_tt开头:

http://msdn.microsoft.com/library/de...us/vclib/html/

_crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp


问候,

乔。

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/de...us/vclib/html/
_crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.

推荐答案

对不起,在我的帖子中发了一些错误,这里再次传达消息:


您好,


我正在转换一个大的MFC应用程序来支持UNICODE所以它可以是

翻译成中文/日文。

应用程序是使用visual studio 6.0进行的我希望能够使用和不使用_UNICODE预处理器定义来编译它。


为此我使用了TCHAR提供的功能。 H,例如我在_ttoi(..)命令中更改所有

atoi(..)命令,因此它将支持_UNICODE和

单字节字符。定义了_UNICODE后,这将导致一个

_wtoi()命令,如果没有_UNICODE定义,这将导致atoi()

命令。


我遇到的问题是atof(..),TCHAR.H在Visual Studio 6.0中没有为它提供一个函数

,它支持UNICODE和

非UNICODE。在Visual Studio 7.x中,函数_tstof(..)执行此操作,其中

也是在TCHAR.H文件中定义的



我是否需要升级到Visual Studio 7.x或者我可以下载一些软件包

升级TCHAR库吗?


命令我想要使用可以在这个MSDN部分找到并且所有

都以_tst或_tt开头:

http://msdn.microsoft.com/library/de...us/vclib / html /

_crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp


问候,

Joe。

" JoeKowalski" <乔********* @ usa.com>在消息中写道

news:40 *********************** @ news.xs4all.nl ...
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/de...us/vclib/html/
_crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.
"JoeKowalski" <Jo*********@usa.com> wrote in message
news:40***********************@news.xs4all.nl...
您好,

我正在转换一个大的MFC应用程序以支持UNICODE,因此可以将其翻译成中文/日文。
该应用程序是通过视觉工作室6.0,我希望能够使用和不使用_UNICODE预处理器定义来编译它。

为此我使用TCHAR.H提供的功能,例如我在_wtoi(..)命令中更改
所有atoi(..)命令,因此它将支持_UNICODE
和单字节字符。

问题我'我正在使用atof(..),TCHAR.H在Visual Studio 6.0中还没有为它提供
函数,它支持UNICODE和
非UNICODE。在Visual Studio 7.x中,函数_tstof(..)执行此操作,
也在
中定义

我是否需要升级到Visual Studio 7.x或者可以我下载了一些升级TCHAR库的软件包吗?

我想要使用的命令可以在这个MSDN部分找到,所有
都以_tst或_tt开头:

http://msdn.microsoft.com/library/de...us/vclib/html/ _crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp
问候,
Joe。
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/de...us/vclib/html/ _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.



JoeKowalski写道:
JoeKowalski wrote:
对不起,我的一些错误帖子,这里再次传达消息:

您好,我正在转换一个大的MFC应用程序来支持UNICODE所以它可以被翻译成中文/ japanese。
该应用程序是使用visual studio 6.0制作的,我希望能够使用使用和不使用_UNICODE预处理器定义来编译它。

为此,我使用TCHAR.H提供的功能,例如:我在_ttoi(..)命令中更改所有atoi(..)命令,因此它将支持_UNICODE和单字节字符。定义_UNICODE
后,这将导致_wtoi()命令,没有定义_UNICODE
这将导致atoi()命令。

我遇到的问题是使用atof(..),TCHAR.H在Visual Studio 6.0中还没有为它提供
功能,它支持
UNICODE和非UNICODE。在Visual Studio 7.x中,函数
_tstof(..)执行此操作,这也是在TCHAR.H文件中定义的。

我是否需要升级到Visual Studio 7.x或者我可以下载一些升级TCHAR库的
包吗?

我想要使用的命令可以在这个MSDN部分找到
并且都以_tst开头或_tt:

http://msdn.microsoft.com/library/de...us/vclib/html/ _crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp
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/de...us/vclib/html/ _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp



< snip>


您的问题与C ++无关;因此它在这里是偏离主题的。

请在microsoft.vc.public.language中重新询问。

提示:std :: istringstream和std :: ostringstream


- Pete


<snip>

Your question has nothing to do with C++; therefore it is off-topic here.
Please re-ask in microsoft.vc.public.language.
Hint: std::istringstream and std::ostringstream

- Pete


Joe,


如果没别的话,也许你可以尝试使用_tcstod代替?


Johan Rosengren

Abstrakt Mekanik AB


" JoeKowalski" <乔********* @ usa.com> skrev i meddelandet

news:40 ********************* @ news.xs4all.nl ...
Joe,

If nothing else, perhaps you could try using _tcstod instead?

Johan Rosengren
Abstrakt Mekanik AB

"JoeKowalski" <Jo*********@usa.com> skrev i meddelandet
news:40*********************@news.xs4all.nl...
抱歉,在我的帖子中出现了一些错误,这里再次传达消息:

您好,

我正在转换一个大的MFC应用程序来支持UNICODE所以它可以将
翻译成中文/日文。
该应用程序是使用visual studio 6.0制作的,我希望能够在有和没有_UNICODE预处理器定义的情况下编译它。

为此,我使用TCHAR.H提供的功能,例如我在_ttoi(..)命令中更改
所有atoi(..)命令,因此它将支持_UNICODE
和单字节字符。定义了_UNICODE后,这将导致一个
_wtoi()命令,没有_UNICODE定义,这将导致atoi()
命令。

我遇到的问题是使用atof(..),TCHAR.H在Visual Studio 6.0中还没有为它提供
函数,它支持UNICODE和
非UNICODE。在Visual Studio 7.x中,函数_tstof(..)执行此操作,它也在TCHAR.H文件中定义。

我是否需要升级到Visual Studio 7.x或者我可以下载一些升级TCHAR库的软件包吗?

我想要使用的命令可以在这个MSDN部分找到,所有
都以_tst开头或_tt:

http://msdn.microsoft.com/library/de...us/vclib/html/ _crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp

问候,
乔。
JoeKowalski <乔********* @ usa.com>在消息中写道
新闻:40 *********************** @ news.xs4all.nl ...
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/de...us/vclib/html/ _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.
"JoeKowalski" <Jo*********@usa.com> wrote in message
news:40***********************@news.xs4all.nl...
您好,

我正在转换一个大的MFC应用程序以支持UNICODE,因此它可以被翻译成中文/日文。
该应用程序是使用visual studio 6.0和我希望能够在有和没有_UNICODE预处理器定义的情况下编译它。

为此我使用TCHAR.H提供的功能,例如我在_wtoi(..)命令中更改
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


所有

atoi(..)命令,因此它将支持_UNICODE
atoi(..) commands in _wtoi(..) commands so it will suport both _UNICODE


单字节字符。

我遇到的问题是atof(..),TCHAR.H没有提供
single byte characters.

The problem i''m having is with atof(..), TCHAR.H doesn''t provide a


function


function

for itly(还)在Visual Studio 6.0中,它支持UNICODE和
非UNICODE。在Visual Studio 7.x中,函数_tstof(..)执行此
,这也是
中定义的

我是否需要升级到Visual Studio 7.x或者可以我下载了一些升级TCHAR库的软件包?

我想要使用的命令可以在这个MSDN部分找到,
都以_tst或_tt开头:
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/de...us/vclib/html/

_crt_atof.2c_.atoi.2c _._ atoi64.2c_.atol.asp

问候,
Joe。
_crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp

Regards,
Joe.




这篇关于VC6.0中的atof()和_tstof()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆