//程序清单3.2
//超出整数极限
#include <iostream>
#define ZERO 0 //ZERO代表0
#include <climits>
int main(void)
{
using namespace std;
short sam = SHRT_MAX; //32767
unsigned short sue = sam; //32767
cout << "Sam has " << sam << " dollars and Sue has " << sue
<< " dollars deposited.\n";
cout << "Add $1 to each account." << endl << "Now ";
sam = sam + 1; //-32768
sue += 1; //32768
cout << "Sam has " <&
本章内容包括:C++变量命名规则 C++内置整型:unsigned long、long、unsigned int、int、unsigned short、short、unsigned char、char、signed char和bool C++新增整型:unsigned long long 和 long long 表示各种整型的系统限制的climits文件 各种整型的数字字面值(常量) const创建符号常量 C++内置浮点类型:float、double和long double 表示各种浮点