Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 118,692 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,166 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



ULONGLONG to string

 
Reply to this topicStart new topic

ULONGLONG to string, using _ui64toa()?

tootypegs
post 7 Aug, 2008 - 05:22 AM
Post #1


D.I.C Head

**
Joined: 9 Oct, 2007
Posts: 173


My Contributions


hi, I seem to be stuck trying to preform a conversion on a ULONGLONG to a string. I've seen a few things regarding ui64toa() but ive never herd of this before and never used it so im not particulay sure that this is will do the job im after? I have also seen something like a stringstream? Could you guys advise on how these work?

thank you
User is online!Profile CardPM

Go to the top of the page


jwwicks
post 7 Aug, 2008 - 06:07 AM
Post #2


D.I.C Head

Group Icon
Joined: 31 Jul, 2008
Posts: 57



Thanked 6 times

Dream Kudos: 200
My Contributions


Hello tootypegs,

QUOTE(tootypegs @ 7 Aug, 2008 - 05:22 AM) *

hi, I seem to be stuck trying to preform a conversion on a ULONGLONG to a string. I've seen a few things regarding ui64toa() but ive never herd of this before and never used it so im not particulay sure that this is will do the job im after? I have also seen something like a stringstream? Could you guys advise on how these work?

thank you


Try my conversion template...

http://www.dreamincode.net/code/snippet2285.htm

JW
User is offlineProfile CardPM

Go to the top of the page

perfectly.insane
post 7 Aug, 2008 - 02:39 PM
Post #3


D.I.C Addict

Group Icon
Joined: 22 Mar, 2008
Posts: 550



Thanked 43 times

Dream Kudos: 25
My Contributions


_snprintf/_snwprintf handles this on Windows. I think the normal sprintf and printf functions handle this using MSVCRT.DLL. I believe the format code is supposed to be %I64d. On BSD, I believe the %q format code is used for printf/sprintf.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 10/12/08 08:07AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month