如何将整数转换为ASCII码
1个回答
展开全部
比如 int =63,对应的16进制为3F,ASCII字符为
C/C++ code?
1
2
int i = 63;
Caption = char(i);
C/C++ code?
1
2
3
4
5
6
7
8
9
10
11
12
13
char getAscii(int aval)
{
return char(aval);
}
void __fastcall TForm3::FormCreate(TObject *Sender)
{
int i = 63;
Caption = getAscii(i);
i = 97;
Caption = getAscii(i);
}
C/C++ code?
1
2
int i = 63;
Caption = char(i);
C/C++ code?
1
2
3
4
5
6
7
8
9
10
11
12
13
char getAscii(int aval)
{
return char(aval);
}
void __fastcall TForm3::FormCreate(TObject *Sender)
{
int i = 63;
Caption = getAscii(i);
i = 97;
Caption = getAscii(i);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询