linux下线程 线程与进程的关系: 之前转载的微信文章,进程与线程的差别已经说得比較清楚了。能够查看之前转载的文章。linux进程与线程的差别。 创建一个线程: #include<pthread.h> int pthread_creat(pthread_t * thread,pthread_att ...
分类:
编程语言 时间:
2017-05-28 12:24:16
阅读次数:
213
分析: 组成单词好说,价值如何体现? 改变指数就行,例如: 这样,组成的单词,指数就是权值,多项式相乘,指数小于50的就OK; 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 int ch[30]; 6 int a[100]; 7 in ...
分类:
其他好文 时间:
2017-05-28 11:45:44
阅读次数:
166
1 #include<iostream> 2 #include<cstring> 3 #include <string.h> 4 5 int main(){ 6 7 int *a =new int[100]; 8 for(int i=0;i<100;i++){a[i]=i;} 9 char *b; ...
分类:
编程语言 时间:
2017-05-28 11:44:43
阅读次数:
147
//插入排序 void InsertSort(int *a,int n) { int i=0,j; for(;++i<n;) { for(j=i;--j>=0;) { if(a[j+1]<a[j]){ swap(&a[j+1],&a[j]); } else { break; } } //插入排序 v ...
分类:
编程语言 时间:
2017-05-28 11:01:27
阅读次数:
147
//#include <iostream> #include <cmath> #include <stack> //using namespace std; //const int MAXN=10; //int Stack[MAXN]; stack<int> s; class Solution { ...
分类:
其他好文 时间:
2017-05-28 10:55:30
阅读次数:
148
//编写函数实现库函数atof #include <stdio.h> #include <assert.h> #include <ctype.h> #include <math.h> double calculate(const char *src, int flag) { double num = ...
分类:
编程语言 时间:
2017-05-28 10:51:04
阅读次数:
154
hjs@ubuntu:~/projects/ConsoleApplication1$ cat main.cpp#include <cstdio> int main(){// int a = 1; printf("hello from ConsoleApplication1!\n"); return ...
分类:
数据库 时间:
2017-05-28 10:04:51
阅读次数:
203
在《大话设计模式》这本书中,我会听到这个字眼“对接口编程”,而在文中的类图中。会提出这样一个疑问?为什么有的用的是:接口?有的用的是抽象类呢? 本文主要介绍下面内容:接口、抽象类。 文章的最后,会给出软考下午设计模式题中的一些做题技巧 ? 什么是接口? 接口是包括一组虚方法的抽象类型,当中每一种方法 ...
分类:
其他好文 时间:
2017-05-28 10:03:14
阅读次数:
145
题目打开图片就能够看到 void main(void) {union unt { unsigned char uc[4]; unsigned int ui; }; union unt t; t.ui=0x12345678; printf("%d\n",t.uc[1]);} 共同体在嵌入式开发中是非常 ...
分类:
其他好文 时间:
2017-05-28 09:55:43
阅读次数:
194
??1.函数介绍 close(关闭文件) 相关函数 open,fcntl。shutdown,unlink,fclose 表头文件 #include<unistd.h> 定义函数 int close(int fd); 函数说明 当使用完文件后若已不再须要则可使用close()关闭该文件,二close( ...
分类:
系统相关 时间:
2017-05-28 09:52:52
阅读次数:
306