malloc分配空间,;printf %d;s;c%转换说明;c++中bool返回值只有0,1;宏定义;using namespace std的作用,

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    

猜你喜欢

转载自blog.csdn.net/qq_38998213/article/details/103420048
今日推荐