创建线程与join() #include<iostream> #include<thread> using namespace std; void proc() { cout << "我是子线程" << endl; } int main() { thread th2(proc); th2.join( ...
分类:
编程语言 时间:
2020-08-17 16:41:39
阅读次数:
74
#include <stdio.h> #include <SDL.h> // 每次读取2帧数据, 以1024个采样点一帧 2通道 16bit采样点为例 #define PCM_BUFFER_SIZE (1024*2*2*2) // 音频PCM数据缓存 static Uint8 *s_audio_bu ...
分类:
其他好文 时间:
2020-08-15 22:37:43
阅读次数:
68
动态sql 复用sql语句 1.定义sql片段 <sql id="xxx_column">被复用的片段</sql> 2.引用sql片段 <include refid="xxx_column"></include> 动态sql 简化查询 DAO简化 将所有可能查询的参数,封装成XxxQuery对象 w ...
分类:
其他好文 时间:
2020-08-15 22:29:43
阅读次数:
58
头文件文件名game.h#defineROW3//定义行#defineCOL3//定义列#include<Windows.h>#include<stdlib.h>#include<stdio.h>voidchushihua(charboard[ROW][COL],introw,intcol);//声明函数chushihuavoidxianshiqipan(cha
分类:
编程语言 时间:
2020-08-13 22:17:58
阅读次数:
64
打水问题: 删数问题: #include<bits/stdc++.h> #define MAXN 10000 using namespace std; int main() { string s; int len,k; cin>>s>>k; len=s.size(); for(int t=1;t<= ...
分类:
编程语言 时间:
2020-08-13 12:15:44
阅读次数:
59
#include<iostream> using namespace std; struct node { int v,height; node*lchild; node*rchild; int data; }; int x; node* newNode(int v) { node*Node =ne ...
分类:
其他好文 时间:
2020-08-13 12:14:51
阅读次数:
95
首先取出这个项链的长度x,如果他是回文数的话让项链减去一半,x减去一半,如果他不是回文数,就退出循环 上代码: #include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <algorithm>#inc ...
分类:
其他好文 时间:
2020-08-13 12:13:39
阅读次数:
53
1 题目描述 给定无向连通图G=(V, E)和m种不同的颜色,用这些颜色为图G的各顶点着色,每个顶点着一种颜色。是否有一种着色法使G中相邻的两个顶点有不同的颜色? 这个问题是图的m可着色判定问题。若一个图最少需要m种颜色才能使图中每条边连接的两个顶点着不同颜色,则称这个数m为该图的色数。求一个图的色 ...
分类:
其他好文 时间:
2020-08-12 15:59:30
阅读次数:
54
题目:八进制转换为十进制 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() 4 { 5 int n=0,i=0; 6 char s[20]; 7 printf("请输入一个8进制数:\n"); 8 gets(s); 9 ...
分类:
其他好文 时间:
2020-08-11 15:51:15
阅读次数:
71
//头文件circlelist.h #pragma once #ifndef CIRCLELIST_H_ #define CIRCLELIST_H_ #include<iostream> using namespace std; struct circleNode{ float data; circ ...
分类:
其他好文 时间:
2020-08-10 22:06:07
阅读次数:
67