#include
//#include
using namespace std;
struct node
{
char word[10];
int num;
};
node obj[100];
void my_word(char input[], char output[])
{
int sum=0,flag=0;...
分类:
其他好文 时间:
2014-05-22 12:41:25
阅读次数:
233
#include
#include
struct test
{
char name[20];
void (*func)(char *);
};
void tttfunc(char *name)
{
printf("current is %d\n",__LINE__);
printf("%s\n",name);
}
int main()
{
struct test ttt=
{
.n...
分类:
系统相关 时间:
2014-05-22 11:25:09
阅读次数:
380
#include
void main(){
const int count = 5;//定义数量
struct student{
char name[80];
float math,eng;
float aver;
}stu[count],temp;
//输入
for (int i = 0; i
scanf("%s%f%f", stu[i].name, &stu[i].m...
分类:
编程语言 时间:
2014-05-22 11:21:15
阅读次数:
312
//3、假定有20个 有序 数组,每个数组有500个数字,数字类型32位uint数值,现在需要取出这10000个数字中最大的500个,怎么做?
#include
using namespace std;
struct node
{
int data;
int next;
};
node obj[20];
void sift(int k,int m,int ...
分类:
其他好文 时间:
2014-05-22 10:54:48
阅读次数:
292
Sol:就是求第N项的斐波那契数。矩阵乘法+快速幂
#include
#include
#include
#include
using namespace std;
#define LL long long
struct Mat{
LL f[2][2];
};
LL MOD = 10000;
Mat mul(Mat a,Mat b)
{
LL i,j,k...
分类:
其他好文 时间:
2014-05-22 10:46:35
阅读次数:
191
完全按照海涛哥剑指offer里边的递归思路来写的,基本一样,仅作学习验证,努力锻炼,努力学习!code如下:
//Change a BSTree to a sorted double linklist
struct BSTreeNode
{
int value;
BSTreeNode *left;
BSTreeNode *right;
}head;
//Create a node of...
分类:
其他好文 时间:
2014-05-22 10:23:27
阅读次数:
237
8.3 使用二进制数据记录布局
Struct模块提供了pack()和unpack()方法来处理可变长度的二进制格式。接下来的例子展示在一个没用zipfile模块的zipfile如何通过标题信息循环。压缩码“H”和“I”分别表示2和4字节无符号数字,“”表明都是标准大小并且按照little-endian字节排序。
8.4 多线程
线程是一种针对分离不连续和依赖的任务的技术。用线程可以提高...
分类:
编程语言 时间:
2014-05-22 07:26:58
阅读次数:
311
一。在Windows7 32bit ,IDE为VS2010中测试...
分类:
编程语言 时间:
2014-05-22 07:08:00
阅读次数:
469
信号量和P、V原语由Dijkstra(迪杰斯特拉)提出
信号量
互斥:P、V在同一个进程中
同步:P、V在不同进程中
信号量值含义
S>0:S表示可用资源的个数
S=0:表示无可用资源,无等待进程
S
信号量
struct semaphore
{
int value;
pointer_PCB queue;
}
P原语
P(s)
...
分类:
其他好文 时间:
2014-05-22 07:01:59
阅读次数:
319
DWORD WINAPI mythread( LPVOID lpParameter) //客户线程{ struct My my; memcpy(&my,lpParameter,sizeof(My)); printf("One client connect!\n"); char str1; ......
分类:
其他好文 时间:
2014-05-22 06:31:02
阅读次数:
319