每次输入7时,Cmd都会发出“嘟嘟”声

时间:2015-03-26 23:33:14

标签: visual-c++

当我执行此操作时,每次输入7时,PC都会发出“嘟嘟”声。有人能解释一下为什么吗?我使用此标题:http://www.stroustrup.com/Programming/std_lib_facilities.h

int main()
{
    double d = 0;
    while (cin >> d){
        int i = d;
        char c = i;
        int i2 = c;
        cout << "d==" << d
            << " i==" << i
            << " i2==" << i2
            << " char==(" << c << ")\n";
    }
}

1 个答案:

答案 0 :(得分:2)

ASCII字符7是bell character可以追溯到远古时代的电传...