INT_MAX_MIN

 
// Author: poseidonyu 


#include 

#define INT_MAX        ((int)(~0U>>1))
#define INT_MIN        (-INT_MAX - 1)

int main()
{
    printf("INT_MAX = %d, INT_MIN = %d\n\n", INT_MAX, INT_MIN);

    printf("~0U = %x, (~0U>>1) = %x\n", ~0U, (~0U>>1));

    return 0;
}

/*
INT_MAX = 2147483647, INT_MIN = -2147483648

~0U = ffffffff, (~0U>>1) = 7fffffff
*/
转自: http://blogold.chinaunix.net/u3/110937/showart_2161956.html

你可能感兴趣的:(C/C++,OpenCV)