Iva*_*vić 3 c++ iostream c++-cli console-application
// 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;
}
Run Code Online (Sandbox Code Playgroud)
最后一个输出,数字7不显示任何字符,只显示空格.