Thread: how to #define INT MAX?

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    22

    how to #define INT MAX?

    Code:
    #include<stdio.h> 
    #include<limits.h>
    #define MAXIMUM INT MAX
    .
    .
    quo=x/MAXIMUM;
    .
    is it Okay to define MAXIMUM to the value of INT MAX?
    quo=x/MAXIMUM; warning statement has no effedt

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >#define MAXIMUM INT MAX
    It should be:
    Code:
    /* Notice the underscore */
    #define MAXIMUM INT_MAX
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    22
    whoohooo it works!

    THX!

    I need new glasses

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  4. Help getting multiple keypresses in a DOS compiler
    By Nongan in forum Game Programming
    Replies: 2
    Last Post: 04-01-2005, 10:07 PM
  5. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM