随笔分类 - C/C++
摘要:void sorr(int array[], int start, int last) { for (int i = start; i < last-1; i++) { for (int j = start; j < last - 1;j++) { if (array[j] > array[j +
阅读全文
摘要:#include <iostream> using namespace std; class base1 { private: int a, b; public: base1(int i) : b(i + 1), a(b) {} base1():b(0), a(b) {} int get_a() {
阅读全文
摘要:子串(包括空串):n(n+1)/2 + 1 非空子串(不包括空串):n(n+1)/2 非空真子串(不包括空串和跟自己一样的子串):n(n+1)/2 - 1 所以答案是37
阅读全文
摘要:如果六个字母不同则有A66 种方法 但有两个字母重复,一个字母重复是除以2,两个就是A66 /4=180
阅读全文
摘要:[https://www.libxl.com/](https://www.libxl.com/)
阅读全文
摘要:在 C++ 中使用 CreateThread() 函数可以创建一个新线程。以下是使用 CreateThread() 函数的基本示例: #include <Windows.h> #include <iostream> using namespace std; // 线程入口函数 DWORD WINAP
阅读全文
摘要:MFC中可以通过以下步骤实现只运行一个实例: 定义一个唯一的标识符,在应用程序的头文件中声明: #define SINGLE_INSTANCE_GUID "{12345678-1234-5678-9012-345678901234}" 在InitInstance()函数中,创建一个互斥体并检查互斥体
阅读全文
摘要:以下是 C 语言实现 HTTP 文件下载的断点续传示例代码。假设要下载的文件 URL 为 http://example.com/example.zip,本地保存为 example.zip。 #include <stdio.h> #include <stdlib.h> #include <curl/c
阅读全文

浙公网安备 33010602011771号