随笔分类 -  C/C++

1 2 3 4 5 ··· 44 下一页
摘要:class MyClassA { public: MyClassA():b(new char[12]) { memset(b, 0, 12); strcpy(b,"hello"); cout << "构造" << endl; } ~MyClassA() { if (b) { cout << "析构" 阅读全文
posted @ 2025-10-23 15:45 我不是萧海哇~~~ 阅读(2) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-10-23 15:24 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-10-23 11:24 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
摘要:typedef struct nodes_t { int data; struct nodes_t* next; }nodes_t; static nodes_t* head_point = NULL; nodes_t* createNode(nodes_t *node) { nodes_t *p1 阅读全文
posted @ 2025-10-17 18:31 我不是萧海哇~~~ 阅读(8) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-10-17 09:19 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
摘要:给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 你的目标是使用最少的跳跃次数到达数组的最后一个位置。 示例: 输入: [2,3,1,1,4] 输出: 2 解释: 跳到最后一个位置的最小跳跃数是 2。 从下标为 0 跳到下标为 1 的位置,跳 1 阅读全文
posted @ 2025-10-15 18:06 我不是萧海哇~~~ 阅读(9) 评论(0) 推荐(0)
摘要:#define ALIGNMENT 8 // 内存对齐:将size向上对齐到最近的ALIGNMENT倍数 static size_t align_size(size_t size) { if(size==0) return ALIGNMENT; // 对齐公式:(size + 对齐数 - 1) & 阅读全文
posted @ 2025-10-15 15:37 我不是萧海哇~~~ 阅读(3) 评论(0) 推荐(0)
摘要:void *Memcpy(void *dest, const void *src, size_t count) { cout<<"sizeof(dest)是:"<<sizeof(dest)<<endl; int bytelen=count/sizeof(dest); /*按CPU位宽拷贝*/ int 阅读全文
posted @ 2025-09-24 09:40 我不是萧海哇~~~ 阅读(6) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-19 17:04 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-19 16:42 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-17 17:59 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-17 17:48 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-17 15:43 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-13 13:20 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-12 14:29 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
摘要:https://github.com/guanzhi/GmSSL?tab=readme-ov-file 阅读全文
posted @ 2025-09-11 14:46 我不是萧海哇~~~ 阅读(11) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-11 10:58 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <openssl/aes.h> #include <openssl/rand.h> #include <openssl/evp.h> #include <opens 阅读全文
posted @ 2025-09-11 10:41 我不是萧海哇~~~ 阅读(35) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2025-09-10 22:31 我不是萧海哇~~~ 阅读(0) 评论(0) 推荐(0)
摘要:#include <openssl/evp.h> #include <openssl/asn1.h> // 从PKCS8编码中获得公钥 int lbxx_pkcs8_d2i_sm2_pubkey(unsigned char* pucDer, unsigned int puiLen, unsigned 阅读全文
posted @ 2025-09-10 18:06 我不是萧海哇~~~ 阅读(15) 评论(0) 推荐(0)

1 2 3 4 5 ··· 44 下一页