MessageBoxA多线程-2
2016-03-14 00:58
316 查看
#include <iostream>
#include <thread>
#include <windows.h>
#include <vector>
using namespace std;
using namespace std::this_thread;
void msg()
{
MessageBoxA(0, "12345", "678910", 0);
}
void main()
{
vector<thread *> threads;
for (int i = 0; i < 10;i++)
{
threads.push_back(new thread(msg));//创建一个线程
}
for (auto th: threads)
{
th->join();
}
system("pause");
}
#include <thread>
#include <windows.h>
#include <vector>
using namespace std;
using namespace std::this_thread;
void msg()
{
MessageBoxA(0, "12345", "678910", 0);
}
void main()
{
vector<thread *> threads;
for (int i = 0; i < 10;i++)
{
threads.push_back(new thread(msg));//创建一个线程
}
for (auto th: threads)
{
th->join();
}
system("pause");
}
相关文章推荐
- 指针学习笔记(4)——指针与数组
- c++第二次实验(函数题)
- Linux学习笔记2016.03.13
- 为什么要用二级指针
- Java中可变长参数的使用及注意事项
- VSALM 动手实验 - 持续集成
- Android_View动画
- 感叹号!在Dojo中的作用
- Android基础工具类重构系列一Toast
- MessageBoxA多线程-1
- [C++关键字] alignof & alignas 内存对齐 sizeof 占内存大小
- Fedora23下安装QT5.5.1之路
- mybatis collection 高级映射出错问题解决
- Hadoop:适合大数据的分布式存储与计算平台(第三讲)
- 谈谈人工智能、围棋与数学
- HTML5学习笔记(总结提炼版)——001常见的HTML标签
- grep、egrep及相应的正则表达式和用法
- 第一次上机实验
- 10003---solr查询不使用query analyzer中文分词的问题解决
- 托福 103,GRE 158+167+3.5