Results 1 to 3 of 3

Thread: Working with long long in C

  1. #1

    Working with long long in C

    Hello again. If you've read the programming challenge thread, you'll know I made a factoring program that I'm trying to convert to 64-bit. I have two problems. The first is getting a 64-bit value from the prompt. Here is the line from my source code that should do it. "number" is an unsigned long long by the way.

    Code:
    number=strtoull(argv[1],0,10);
    The second passed value is 0 because I want it to discard errors the user types. I'm not putting in error protection right now. So this works for numbers below 2 ^ 32, but after that it returns false numbers. I can't see what the failure is.

    Also, is there a way to print long long integers with printf or a similar function? I'd even settle for a function that converts it to a string, but it would be very hard to make my own. Any ideas? Thanks.

  2. #2

    Re: Working with long long in C

    Nevermind. I have no idea how but I got it to work.

  3. #3
    Guest

    Re: Working with long long in C


    Nevermind. I have no idea how but I got it to work.
    i think that phrase has been said countless times over at Microsoft

Similar Threads

  1. HELP PLEASE! Long file names problem
    By paulmarcw in forum Windows - General Topics
    Replies: 1
    Last Post: 02-24-2006, 04:12 AM
  2. W Explorer can't handle long file names
    By paulmarcw in forum Windows - General Topics
    Replies: 8
    Last Post: 02-18-2006, 04:47 AM
  3. Mandrake takes a long time to boot
    By in forum Linux - Software, Applications & Programming
    Replies: 29
    Last Post: 10-19-2003, 11:00 PM
  4. Waimea...installed...not working
    By cybspur in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 04-01-2003, 04:18 AM
  5. .profile not working correctly
    By NeoStarO1 in forum BSD
    Replies: 5
    Last Post: 08-09-2002, 03:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •