找下错误
/* program 2.11 finding the limits */#include<stdio.h>
#include<limits.h>
#include<float.h>
int main(void)
{
printf("variables of type char store values from %d to %d",CHAR_MIN,CHAR_MAX);
printf("\nvariables of type unsigned char store values from 0 to %u",UCHAR_MAX);
printf("\nvariables of type short store values from %d to %d",SHRT_MIN,SHRT_MAX);
printf("\nvariables of type unsigned short store values from 0 to %u",USHRT_MAX);
printf("\nvariables of type int store values from %d to %d",INT_MIN,INT_MAX);
printf("\nvariables of type unsigned int store values form 0 to %U",UINT_MAX);
printf("\nvariables of type long store values from %ld to %ld",LONG_MIN,LONG_MAX);
printf("\nvariables of type unsigned long store values from 0 to %lu",ULONG_MAX);
printf("\nvariables of type long long store values from %lld to %lld",LLONG_MIN,LLONG_MAX);
printf("\nvariables of type unsignes long long store values from 0 to %llu",ULLONG_MAX);
printf("\n\nthe size of the smallest non-zero value of type float is %.3e",FLT_MIN);
printf("\nthe size of the largest value of type float is %.3e",FLT_MAX);
printf("\nthe size of the smallest non-zero value of type double is %.3e",DBL_MIN);
printf("\nthe size of the largest value of type double is %.3e",DBL_MAX);
printf("\nthe size of the smallest non-zero value ~ccc of type long double is %.3e",LDBL_MIN);
printf("\nthe size of the largest value of type long double is %.3e\n",LDBL_MAX);
printf("\nvariables of type float provide %u decimal digits precision."FLT_DIG);
printf("\nvariables of type double provide %u decimal digits precision."DBL_DIG);
printf("\nvariables of type long double provide %u decimal digits precision."LDBL_DIG);
return 0;
}
错误提示
--------------------Configuration: find min or max - Win32 Debug--------------------
Compiling...
find min or max.c
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(16) : error C2065: 'LLONG_MIN' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(16) : error C2065: 'LLONG_MAX' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(17) : error C2065: 'ULLONG_MAX' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(24) : error C2143: syntax error : missing ')' before 'constant'
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(24) : error C2059: syntax error : ')'
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(25) : error C2143: syntax error : missing ')' before 'constant'
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(25) : error C2059: syntax error : ')'
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(26) : error C2143: syntax error : missing ')' before 'constant'
C:\Documents and Settings\Administrator\桌面\c\2\2.11\find min or max.c(26) : error C2059: syntax error : ')'
执行 cl.exe 时出错.
find min or max.exe - 1 error(s), 0 warning(s)