
C++
快乐飞奔的小菜鸡
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++多线程小练习
#include <iostream>#include <thread>using namespace std;void func(string &s){ cout<<"hello,this is my thread,thread id is" <<this_thread::get_id()<<endl; }int main(){ string s = "test"; thread th = thread(f原创 2020-07-01 11:28:44 · 403 阅读 · 0 评论 -
#pragma once与 #ifndef详解
作用简介:为了避免同一个文件被include多次1 #ifndef方式2 #pragma once方式同一个文件被include多次的危害:(1)防止重复定义的错误;(2)如果这个头文件变化,那么所有include这个文件的源文件都需要重新编译,即使没有去使用里面的任何内容避免措施:(1)头文件加#pragma once(2)头文件加#ifndef 宏名 #define 宏名 #endif两者区别:(1)#ifndef和#pragma oncr都发生在预处理阶段,#if原创 2020-06-16 11:08:44 · 828 阅读 · 0 评论 -
C++ 多线程编程
很有意义的几个博客或问答网址:https://www.zhihu.com/search?type=content&q=C%2B%2B%E5%A4%9A%E7%BA%BF%E7%A8%8B%E7%BC%96%E7%A8%8Bhttps://www.cnblogs.com/wangguchangqing/p/6134635.htmlhttps://www.ibm.com/develope...原创 2020-03-24 11:05:31 · 1052 阅读 · 0 评论