上一页 1 2 3 4 5 6 7 ··· 12 下一页
1.静态成员变量 静态成员变量 属于类 而不属于对象 – 静态成员变量不包含在对象中 ,进程级生命期– 静态成员变量的定义和初始化 ,只能在类的外部而不能 在构造函数中进行。– 静态成员变量依然受类作用域和访问控制限定符的约束– 访问静态成员变量 , 既可以通过类也可以通过对象– 静态成员变量为该类 Read More
posted @ 2025-05-03 15:28 靖意风 Views(25) Comments(0) Diggs(0)
1. 简介 MySQL是一个关系型数据库管理系统,由瑞典MySQLAB 公司开发,属于Oracle 旗下产品 MySQL实行双授权政策,分为社区版和商业版,由于其体积小、速度快、拥有成本低且开放源代码,一般中小型应用系统多选择MySQL作为数据库 2. 安装 在系统中安装MySQL服务器、客户端及客 Read More
posted @ 2025-04-23 20:14 靖意风 Views(10) Comments(0) Diggs(0)
1. 在windows下安装QT软件后, 需要添加环境变量 D:\software\qt\5.12.8\mingw73_64\bin D:\software\qt\Tools\mingw730_64\bin D:\software\qt\Tools\QtCreator\bin Read More
posted @ 2025-04-23 08:39 靖意风 Views(10) Comments(0) Diggs(0)
介绍 QT 常用的事件 1. 键盘事件 1> 需要添加头文件<QKeyEvent>,并重写如下虚函数 void keyPressEvent(QKeyEvent *event)2> 通过 event->key() 可以获取键值, 其类型是 Qt::Key, 常用的键值有 Qt::Key_Up Qt:: Read More
posted @ 2025-04-12 11:25 靖意风 Views(35) Comments(0) Diggs(0)
1. 编写基本的 信号和 槽函数 1> 自定义的信号函数只需要声明,不需要定义2> 自定义的类放在头文件中,我把类放在cpp文件中,会编译失败3> 需要关注特殊的关键字,Q_OBJECT signals slots SIGNAL SLOT $cat work.h #include <QObject> Read More
posted @ 2025-04-11 22:30 靖意风 Views(10) Comments(0) Diggs(0)
1. 静态库:gcc calc.c -car -r libcalc.lib calc.ogcc main.c -o test -L./ -lcalc 2. 动态库gcc -fpic -c cal.c gcc -shared -o libcalc.so cal.o gcc main.c -o test Read More
posted @ 2025-03-19 13:58 靖意风 Views(7) Comments(0) Diggs(0)
服务端 //基于tcp的服务器 #include<stdio.h> #include<ctype.h> // toupper() #include<string.h> #include<unistd.h> #include<errno.h> #include<sys/socket.h> #inclu Read More
posted @ 2025-03-13 22:21 靖意风 Views(19) Comments(0) Diggs(0)
3.6 do-while 循环编写 itoa(), 使用 do-while 比较合适 void reverse(char *s, int n) { for (int ix = 0, jx = n -1; ix < jx; ix++, jx--) { int tmp = s[ix]; s[ix] = Read More
posted @ 2025-02-26 14:48 靖意风 Views(15) Comments(0) Diggs(0)
练习 2-2 使用逻辑运算符修改 for循环 原来的循环 for (int i = 0; i < limit-1 && (c=getchar()) != '\n' && c != EOF; i++) s[i] = c; 答案中的循环 int flag = 0, i = 0; while (flag) Read More
posted @ 2025-02-25 15:46 靖意风 Views(12) Comments(0) Diggs(0)
函数名称 说明 int atoi(const char *str) 将字符串转化成整型,如果无效,就返回0 int rand(void) 返回一个范围在 0 到 RAND_MAX 之间的伪随机数。 void srand(unsigned int seed) 该函数设置seed数值,对应 rand 使 Read More
posted @ 2025-02-18 11:57 靖意风 Views(10) Comments(0) Diggs(0)
上一页 1 2 3 4 5 6 7 ··· 12 下一页