// Convert Int to Char
#include "stdafx.h"
#include <iostream>
using namespace System;
using namespace std;
int main(array<System::String ^> ^args)
{
for (short i = 0; i < 8; i++ )
{
char newChar = i;
cout << i << " = " << newChar << "\n";
}
cin.get();
return 0;
}
最后的输出,数字 7 没有显示任何字符,只有空格。
最佳答案
ASCII码7是bell字符,这应该会让您的 PC 发出蜂鸣声。
关于c++ - 当我在 C++ 控制台应用程序中打印出超过 7 个控制台输出时,为什么我的 PC 会发出蜂鸣声?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19727894/