Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > atof() and _tstof() in VC6.0

Reply
Thread Tools

atof() and _tstof() in VC6.0

 
 
Pete C.
Guest
Posts: n/a
 
      06-24-2004
JoeKowalski wrote:
> 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>

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:stringstream

- Pete


 
Reply With Quote
 
 
 
 
Johan Rosengren
Guest
Posts: n/a
 
      06-24-2004
Joe,

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

Johan Rosengren
Abstrakt Mekanik AB

"JoeKowalski" <(E-Mail Removed)> skrev i meddelandet
news:40dacedc$0$559$(E-Mail Removed)4all.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" <(E-Mail Removed)> wrote in message
> news:40dacba6$0$42417$(E-Mail Removed)4all.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/de...us/vclib/html/
> > _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp
> >
> > Regards,
> > Joe.
> >
> >

>
>



 
Reply With Quote
 
 
 
 
JoeKowalski
Guest
Posts: n/a
 
      06-24-2004
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.


 
Reply With Quote
 
JoeKowalski
Guest
Posts: n/a
 
      06-24-2004
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" <(E-Mail Removed)> wrote in message
news:40dacba6$0$42417$(E-Mail Removed)4all.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/de...us/vclib/html/
> _crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp
>
> Regards,
> Joe.
>
>



 
Reply With Quote
 
Pete C.
Guest
Posts: n/a
 
      06-24-2004
(rearranged)
Because it reverses the order in which people naturally read.
Why?
Please don't top-post.


Johan Rosengren wrote:
> Joe,
>
> If nothing else, perhaps you could try using _tcstod instead?
>
> Johan Rosengren
> Abstrakt Mekanik AB
>

<snip>

Hmm, even when I include all of the C++ and C headers, my compiler reports
that that function doesn't exist. How odd, because something non-standard
surely wouldn't be posted here...

- Pete


 
Reply With Quote
 
Johan Rosengren
Guest
Posts: n/a
 
      06-24-2004
Pete,

"Pete C." <(E-Mail Removed)> skrev i meddelandet
news:giBCc.12227$(E-Mail Removed) link.net...
> (rearranged)
> Because it reverses the order in which people naturally read.
> Why?
> Please don't top-post.
>


First of all. who died and made you king - I post in any order I like, OK?

A few notes:

1. For short questions with a short answer, I normally top-post, and prefer
if other do it as well as it is easy to - at a glance - see if there is more
to add to the answer. I do not, however, try to impose my opinions in this
question on others, and would be happy if you refrained from the same.

2. When a post merits comments, I put them in the "normal" sequence.

And finally, do you repeat all of a conversation for every new utterance?


>
> Johan Rosengren wrote:
> > Joe,
> >
> > If nothing else, perhaps you could try using _tcstod instead?
> >
> > Johan Rosengren
> > Abstrakt Mekanik AB
> >

> <snip>
>
> Hmm, even when I include all of the C++ and C headers, my compiler reports
> that that function doesn't exist. How odd, because something non-standard
> surely wouldn't be posted here...
>
> - Pete
>


Oh, *sorry*, I thought the "VC6.0" in the title of the post and the
cross-post would be a dead give-away!

People like you really give a new and interesting meaning to concepts such
as "friendliness", "community spirit" and "helpfulness". Such as
"arrogance", "pompous" and "twit".

Johan Rosengren
Abstrakt Mekanik AB

>



 
Reply With Quote
 
JoeKowalski
Guest
Posts: n/a
 
      06-24-2004

"Pete C." <(E-Mail Removed)> wrote in message
news:giBCc.12227$(E-Mail Removed) link.net...
> (rearranged)
> Because it reverses the order in which people naturally read.
> Why?
> Please don't top-post.
>
>
> Johan Rosengren wrote:
> > Joe,
> >
> > If nothing else, perhaps you could try using _tcstod instead?
> >
> > Johan Rosengren
> > Abstrakt Mekanik AB
> >

> <snip>
>
> Hmm, even when I include all of the C++ and C headers, my compiler reports
> that that function doesn't exist. How odd, because something non-standard
> surely wouldn't be posted here...
>
> - Pete
>
>


Sorry, that's my mistake..

I cross-posted the original message in microsoft.public.vc.mfc and in
comp.lang.c++. I forgot MFC questions should not be posted here. That's why
some are replying in this c++ newsgroup, just like you are replying that
this is 'Off-topic' in the microsoft MFC newsgroup.

Joe.


 
Reply With Quote
 
Pete C.
Guest
Posts: n/a
 
      06-24-2004
Johan Rosengren wrote:
> Pete,
>
> "Pete C." <(E-Mail Removed)> skrev i meddelandet
> news:giBCc.12227$(E-Mail Removed) link.net...
>> (rearranged)
>> Because it reverses the order in which people naturally read.
>> Why?
>> Please don't top-post.
>>

>
> First of all. who died and made you king - I post in any order I
> like, OK?


http://www.parashift.com/c++-faq-lit...t.html#faq-5.4

>
> A few notes:
>
> 1. For short questions with a short answer, I normally top-post, and
> prefer if other do it as well as it is easy to - at a glance - see if
> there is more to add to the answer. I do not, however, try to impose
> my opinions in this question on others, and would be happy if you
> refrained from the same.
>
> 2. When a post merits comments, I put them in the "normal" sequence.
>
> And finally, do you repeat all of a conversation for every new
> utterance?
>
>>
>> Johan Rosengren wrote:
>>> Joe,
>>>
>>> If nothing else, perhaps you could try using _tcstod instead?
>>>
>>> Johan Rosengren
>>> Abstrakt Mekanik AB
>>>

>> <snip>
>>
>> Hmm, even when I include all of the C++ and C headers, my compiler
>> reports that that function doesn't exist. How odd, because something
>> non-standard surely wouldn't be posted here...
>>
>> - Pete
>>

>
> Oh, *sorry*, I thought the "VC6.0" in the title of the post and the
> cross-post would be a dead give-away!


Perhaps you could have sent your reply to only the newsgroup where it was
on-topic.

>
> People like you really give a new and interesting meaning to concepts
> such as "friendliness", "community spirit" and "helpfulness". Such as
> "arrogance", "pompous" and "twit".


Yep, people like you sure do.

- Pete

>
> Johan Rosengren
> Abstrakt Mekanik AB




 
Reply With Quote
 
Johan Rosengren
Guest
Posts: n/a
 
      06-24-2004
Pete,

"Pete C." <(E-Mail Removed)> skrev i meddelandet
news:hBCCc.16080$(E-Mail Removed) link.net...
> Johan Rosengren wrote:

<snip>
>
> > First of all. who died and made you king - I post in any order I
> > like, OK?

>
> http://www.parashift.com/c++-faq-lit...t.html#faq-5.4
>


No, I'm sorry. Didn't say you're the king of NTTP.

> >

<snip>

> > Oh, *sorry*, I thought the "VC6.0" in the title of the post and the
> > cross-post would be a dead give-away!

>
> Perhaps you could have sent your reply to only the newsgroup where it was
> on-topic.
>


As opposed to your snotty reply to the OP? How many non-charter posts has
this resulted in? 5? Bravo! *clap, clap, clap*

Johan Rosengren
Abstrakt Mekanik AB


 
Reply With Quote
 
Ian Semmel
Guest
Posts: n/a
 
      06-24-2004
What I hate is people who delete all the original message body in a reply.

I also don't like bottom-posting.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments