摘要: git blame -L 1460(行号) path/filename 阅读全文
posted @ 2022-12-16 09:53 我们都不是哈士奇 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 代码如下 全局变量和static对多线程来讲是不安全的 #include <stdio.h> int *f(void); void g(void); int main(int argc,char const *argv[]) { int *p=f(); printf("*p=%d\n",*p); g 阅读全文
posted @ 2022-12-13 19:09 我们都不是哈士奇 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1.本地变量有本地生存期和局部作用域 2.静态变量具有全局生存期和局部作用域 3.static具有全局生存期和局部作用域 阅读全文
posted @ 2022-12-13 17:30 我们都不是哈士奇 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1.结构体的初始化 #include <stdio.h> struct date{ int month; int day; int year; }; int main() { struct date today = {7,30,2020}; struct date thismonth = {.mon 阅读全文
posted @ 2022-12-13 15:47 我们都不是哈士奇 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1.strlen与sizeof(返回字符串的长度,不包括结尾的0) size_t strlen(const char *s) #include <stdio.h> int getLength(char *s) { int cnt = 0; while (s[cnt] != '\0') { cnt++ 阅读全文
posted @ 2022-12-13 12:59 我们都不是哈士奇 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc,char const *argv[]) { int ch; while ((ch=getchar()) !=EOF) {//ctrl+z就是EOL putchar(ch); } printf("sp\n"); return 0 阅读全文
posted @ 2022-12-11 21:57 我们都不是哈士奇 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 转自https://blog.csdn.net/zimu312500/article/details/124283358 一下子导出localhost的所有数据库 pg_dumpall -h 127.0.0.1 -p 5432 -U postgres -c -f alldb psql –h 127. 阅读全文
posted @ 2022-11-14 12:44 我们都不是哈士奇 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 制表位Tab不是 为了做一个间隔相同的空格,是为了换行时下一行的光标还在上一行相同的位置 阅读全文
posted @ 2022-11-09 19:30 我们都不是哈士奇 阅读(5) 评论(0) 推荐(0) 编辑
摘要: //10的100次方一共101位数 #include <stdio.h> int main() { int indexNum = 0;int sum = 0;char num[101] = {0};char result[10] = {0};int indexResult = 0;int aa = 阅读全文
posted @ 2022-11-05 15:30 我们都不是哈士奇 阅读(15) 评论(0) 推荐(0) 编辑
摘要: QString中汉字是按照UTF-8编码的,QString::toUtf8是输出UTF-8字符集,QString::local8bit是本地操作系统的字符集,QString::tolatin是Ascii码字符集 下图代码中,汉字转成latin QString tmp="汉字";是无意义的,因为asc 阅读全文
posted @ 2022-09-25 12:57 我们都不是哈士奇 阅读(123) 评论(0) 推荐(0) 编辑