随笔分类 - C/C++
摘要:
阅读全文
摘要:link_t* reverse_link2(link_t *head) { link_t* newNode = (link_t*)malloc(sizeof(link_t)); memset(newNode, 0, sizeof(newNode)); newNode->next = NULL; li
阅读全文
摘要:#include <signal.h> #include <sys/wait.h> #include <unistd.h> #include <stdio.h> void sigchld_handler(int signo) { // 回收所有退出的子进程 while (waitpid(-1, NU
阅读全文
摘要:void another_func(string &&str) { cout << "右值str1" << endl; } void another_func(string& str) { cout << "左值str2" << endl; } template <typename T> void
阅读全文
摘要:【C++】完美转发 最新推荐文章于 2025-10-10 13:17:39 发布 原创 于 2025-09-10 15:01:29 发布 · 993 阅读 · 25 · 11 · CC 4.0 BY-SA版权 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处
阅读全文
摘要:class CObject { public: CObject(string str) :m_str(unique_ptr<string>(new string(str))) { cout << "构造函数" << endl; } ~CObject() { if (m_str) cout << "析
阅读全文
摘要:class CObject { public: CObject(string str):m_str(str) { cout << "构造函数" << endl; } CObject(const CObject& obj) { m_str = string(obj.m_str); cout << "拷
阅读全文

浙公网安备 33010602011771号