根据 Stroustrup 的“Programming: Principles and Practice Using C++ (2nd Edition)”,下面的程序应该为对象 'age' 输出 -1 的值。
#include <iostream>
using namespace std;
int main()
{
int age = -1;
cin >> age;
cout << "\nAge:" << age;
}
INPUT: Carlos // string
OUTPUT: 0 // Why not -1 as Stroustrup states ?
C++ Standard: C++ 4.8.1