上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 281 下一页
摘要: void file_update_test() { FILE* fp; char buf[1024] = { 0 }; fp = fopen("1.txt","rb+"); int update_index = 2; int cnt = 0; if (fp == NULL) { printf("op 阅读全文
posted @ 2023-04-16 10:08 萧海~ 阅读(52) 评论(0) 推荐(0) 编辑
摘要: MFC中可以通过以下步骤实现只运行一个实例: 定义一个唯一的标识符,在应用程序的头文件中声明: #define SINGLE_INSTANCE_GUID "{12345678-1234-5678-9012-345678901234}" 在InitInstance()函数中,创建一个互斥体并检查互斥体 阅读全文
posted @ 2023-04-07 15:27 萧海~ 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 头文件: #include <QCloseEvent> .h中申明: void closeEvent(QCloseEvent *event); .cpp中添加 //关闭 void Core::closeEvent(QCloseEvent *event) { if(QMessageBox::Yes = 阅读全文
posted @ 2023-03-26 17:23 萧海~ 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 参考以下代码: import pyttsx3 # 创建TTS引擎对象 engine = pyttsx3.init() # 设置语音属性 engine.setProperty('rate', 218) # 设置语速为150 engine.setProperty('volume', 1.0) # 设置音 阅读全文
posted @ 2023-03-25 17:14 萧海~ 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 简介 Source Insight是一个功能非常强大的,面向项目的程序编辑器,具有针对C/C ++,C#,Java,Objective-C等的内置动态分析。Source Insight可实现多文件代码中变量和函数的快速搜索,有利于代码的搜索与阅读,能够轻松地浏览和编辑代码,同时自动显相关信息,轻松跳 阅读全文
posted @ 2023-03-20 11:35 萧海~ 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 以下是 C 语言实现 HTTP 文件下载的断点续传示例代码。假设要下载的文件 URL 为 http://example.com/example.zip,本地保存为 example.zip。 #include <stdio.h> #include <stdlib.h> #include <curl/c 阅读全文
posted @ 2023-03-15 14:19 萧海~ 阅读(630) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream> #include <boost/asio.hpp> using boost::asio::ip::tcp; int main() { try { boost::asio::io_service io_service; // 阅读全文
posted @ 2023-03-14 18:31 萧海~ 阅读(343) 评论(0) 推荐(0) 编辑
摘要: void createAlpaMat(Mat &mat) { for(int i=0;i<mat.rows;i++) { for(int j=0;j<mat.cols;j++) { Vec4b &rgba=mat.at<Vec4b>(i,j); rgba[0]=UCHAR_MAX; rgba[1]= 阅读全文
posted @ 2023-03-13 21:46 萧海~ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 只两天在做C++的开发,需要一个时间的字符串,星期为中文,精确到毫秒。网上查了一些资料总结如下: #include <windows.h> string getTimeNow() { SYSTEMTIME sys; GetLocalTime(&sys); char nowTime[40]; char 阅读全文
posted @ 2023-03-09 17:58 萧海~ 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 很多时候,柔性数组应用在了变长结构体中,如: StructPacket { Int state; Int len; Char cData[0]; //这里的0长结构体就为变长结构体提供了非常好的支持 }; 首先对0长数组做一个解释: 用途 :长度为0的数组的主要用途是为了满足需要变长度的结构体。 用 阅读全文
posted @ 2023-03-05 18:24 萧海~ 阅读(16) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 281 下一页