char 转ASCII ,其实ascll就是int型十进制数。记住:0: 48(49+1-50 )A:65(奥迪A6)。a:97(小黄页97网)
#include <iostream>
using namespace std;
int main()
{
char aa ='A';
int a=aa;
cout << a << endl;
return 0;
}
malloc对struct分配空间。
L = (LinkList)malloc(sizeof(Node));
printf %d;s;c%转换说明
转换说明符
%a(%A) 浮点数、十六进制数字和p-(P-)记数法(C99)
%c 字符
%d 有符号十进制整数
%f 浮点数(包括float和doulbe)
%o 八进制整数 e.g. 0123
%x(%X) 十六进制整数0f(0F) e.g. 0x1234
%p 指针
%s 字符串
%% "%"
int a=1111;
printf("%d\n",printf("%d\n",a));
结果:
1111
5