Thread: whats the header file for atoll();?

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    39

    whats the header file for atoll();?

    i used stdlib.h
    but it says undefined symbol... whats wrong?
    whats the correct header?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It's C99.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    c99.h?

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    No. You have to compile in C99 mode, because the function was introduced then. If you aren't, then your compiler doesn't see it.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    thanks sir...
    but i used atol(); instead... works fine for my number which is like 9 digits

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Huskar View Post
    thanks sir...
    but i used atol(); instead... works fine for my number which is like 9 digits
    If your number is never beyond 9 digits, why are you using long long? It just takes up twice as much space for, in which you will store all zeros (or ones if your number is signed and negative, perhaps). I would suggest using "long" instead of long long. It is fine for up to 9 and a bit digits (that is 9 digits starting with either 1 or 3 in full range of 0..9 on all the other digits).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. Replies: 6
    Last Post: 04-02-2002, 05:46 AM