Thread: limits.h

  1. #1
    Registered User
    Join Date
    Apr 2019
    Posts
    808

    limits.h

    Earlier today i had an issue with the limits of an int etc i guess it follows on here. i came across the header limits.h and apparently there is a macro defined in there for the maximum unsigned int (UINT_MAX) I did a little more research and found that a unsigned long long can be found with LLONG_MAX however my compiler?? doesn't recognize this.

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    There are different historical C standards: ANSI C (a.k.a., C89 or C90), C99, C11, C17, or C23.
    LLONG_MAX was added with C99 whereas your compiler apparently defaults to an earlier standard.
    With gcc, you ask for a particular standard with the -std flag, so you would say:
    gcc -std=c99 ...

    LLONG_MAX will probably be the same as LONG_MAX anyway.
    A little inaccuracy saves tons of explanation. - H.H. Munro

  3. #3
    Registered User
    Join Date
    Apr 2019
    Posts
    808
    thanks for some reason the c++ c99 standard was checked but not the c c99 standard

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. limits.h Not Found
    By bleda in forum C Programming
    Replies: 1
    Last Post: 02-08-2011, 08:03 AM
  2. Please help, about limits .h
    By kelai in forum C Programming
    Replies: 3
    Last Post: 10-09-2010, 03:48 PM
  3. Using limits.h
    By cleepy in forum C Programming
    Replies: 44
    Last Post: 11-06-2008, 02:25 PM
  4. Limits of C/C++
    By Abda92 in forum C Programming
    Replies: 4
    Last Post: 12-24-2007, 01:22 PM
  5. limits.h
    By kostas in forum C Programming
    Replies: 10
    Last Post: 03-19-2002, 06:36 PM

Tags for this Thread