上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页

2021年5月3日

摘要: #include <stdio.h> #include <unistd.h> //access判断文件权限和是否存在 int main(int argc,char *argv[]) { if(argc != 2) { printf("./a.out filename\n"); return -1; 阅读全文
posted @ 2021-05-03 16:11 lodger47 阅读(544) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <time.h> #include 阅读全文
posted @ 2021-05-03 15:55 lodger47 阅读(222) 评论(0) 推荐(0)
摘要: 非阻塞IO 方法一 int fd=open("/dev/tty",O_RDWR|O_NONBLOCK); 方法二 //fcntl()函数,设置非阻塞 int flags = fcntl(fd,F_GETFL); flags |= O_NONBLOCK; fcntl(fd,F_SETFL,flags) 阅读全文
posted @ 2021-05-03 13:00 lodger47 阅读(247) 评论(0) 推荐(0)
摘要: 文件IO #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> open int open(const char *pathname, int flags); int open(const char *pathname, in 阅读全文
posted @ 2021-05-03 11:53 lodger47 阅读(283) 评论(0) 推荐(0)
摘要: 有时候man xxx没出来想要的内容,有可能是没安装全man文档 sudo yum -y install man-page* 阅读全文
posted @ 2021-05-03 10:35 lodger47 阅读(84) 评论(0) 推荐(0)

2021年5月2日

摘要: makefile makefile|Makefile 目标:依赖 tab键 规则命令 版本一 app:main.c add.c gcc -o app -I./include main.c add.c 版本二 app: main.o add.o gcc -o app -I./include main. 阅读全文
posted @ 2021-05-02 11:22 lodger47 阅读(99) 评论(0) 推荐(0)

2021年5月1日

摘要: // QMessageBox::information(this,"消息框","文件已经打开!",QMessageBox::Ok,QMessageBox::NoButton); // QMessageBox::warning(this,"信息对话框","你到底有问题没"); auto result 阅读全文
posted @ 2021-05-01 23:43 lodger47 阅读(98) 评论(0) 推荐(0)
摘要: //添加资源图片 右键项目->添加文件->Qt->QtResourceFile->起名称->添加前缀->添加文件 ui->actionopen->setIcon(QIcon(":/images/icon/1.png")); //设置对话框 //点击新建按钮弹出对话框 connect(ui->acti 阅读全文
posted @ 2021-05-01 23:20 lodger47 阅读(266) 评论(0) 推荐(0)
摘要: //添加资源图片 右键项目->添加文件->Qt->QtResourceFile->起名称->添加前缀->添加文件 ui->actionopen->setIcon(QIcon(":/images/icon/1.png")); 阅读全文
posted @ 2021-05-01 22:52 lodger47 阅读(92) 评论(0) 推荐(0)
摘要: //菜单栏 QMenuBar *bar = menuBar(); this->setMenuBar(bar); QMenu *fileObj = bar->addMenu("文件"); QMenu *fileEdit = bar->addMenu("编辑"); QAction *newAct = f 阅读全文
posted @ 2021-05-01 21:59 lodger47 阅读(133) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 36 下一页

导航