2018年2月26日
摘要: setText :清空 insertPlainText:不清空、不换行,显示 append:换行、不清空 阅读全文
posted @ 2018-02-26 19:38 徒梦 阅读(713) 评论(0) 推荐(0)
摘要: 1. #include <cstring> //不可以定义string s;可以用到strcpy等函数 using namespace std; #include <string> //可以定义string s;可以用到strcpy等函数 using namesapce std; #include 阅读全文
posted @ 2018-02-26 19:37 徒梦 阅读(225) 评论(0) 推荐(0)
摘要: char中只能存储一个字符,既一个ASCII码。 如char a[2]={'1','11'};中,char[0]打印为1,char[1]打印为 1 char*是char类型指针变量,这个指针变量指向字符串的首地址,这个字符串通常以'\0'作为串结束符,初始化时,可存字符的多少取决于内存的大小 cha 阅读全文
posted @ 2018-02-26 19:36 徒梦 阅读(427) 评论(0) 推荐(0)
摘要: 16位: char 1个字节 char* 2个字节 short int 2个字节 int 2个字节 unsigned int 2个字节 float 4个字节 double 8个字节 long 4个字节 long long 8个字节 unsigned long 4个字节 char 1个字节 char* 阅读全文
posted @ 2018-02-26 19:34 徒梦 阅读(2182) 评论(0) 推荐(0)
摘要: strlen——get the length of a string. size_t strlen(const char *string); Each ofthese functions returns the number of characters instring, notincluding 阅读全文
posted @ 2018-02-26 19:33 徒梦 阅读(4687) 评论(0) 推荐(0)
摘要: 运算符按照优先级大小由上向下排列,在同一行的运算符具有相同优先级。第二行是所有的一元运算符。 () [] -> . 括号(函数等),数组,两种结构成员访问 ! ~ ++ -- + - * & (类型) sizeof 否定,按位否定,增量,减量,正负号, 间接,取地址,类型转换,求大小 * / % 乘 阅读全文
posted @ 2018-02-26 19:32 徒梦 阅读(779) 评论(0) 推荐(0)