Thread: Converting string to __int64

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Converting string to __int64

    How can I do that? Are there any standard functions I can use, or I have to make my own functions for that.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    What compiler do you use.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Dev-C++ (MinGW).
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Well I don't know without testing, but if iostream's do not work for the conversions, then you can test cstdio functions with formatting flags %lld %llu %I64d %I64u.

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I found _atoi64() and _i64toa().
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Ya - those aren't standard.

  7. #7
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    __int64 is not standard (nor is long long); there is no standard way to convert to a nonstandard type.

    There is also no standard integral type guaranteed to be 64 bits or larger.
    Last edited by Cat; 11-23-2006 at 02:49 AM.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. char Handling, probably typical newbie stuff
    By Neolyth in forum C Programming
    Replies: 16
    Last Post: 06-21-2009, 04:05 AM
  2. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  3. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  4. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM