1,判断字符串非空时

char *str;

if(str!=NULL)//NULL全为大写

cout<<“not null!”<<endl;,

2,要用strlen和strcpy,strcat等函数时,要在头部增加#include<string.h>

相关文章:

  • 2021-12-05
  • 2021-09-15
  • 2022-12-23
  • 2021-10-31
  • 2021-05-19
  • 2021-09-20
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2021-06-20
  • 2021-07-01
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
相关资源
相似解决方案