码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
linux timing
double getUnixTime(void){ struct timespec tv; if(clock_gettime(CLOCK_REALTIME, &tv) != 0) return 0; return (((double) tv.tv_sec) + (double) (...
分类:系统相关   时间:2014-07-30 23:25:05    阅读次数:228
单链表练习
//code:#include#includeusing namespace std;typedef int status;typedef int elemType;typedef struct lNode{elemType num;struct lNode *next;}lNode,*linkNo...
分类:其他好文   时间:2014-07-30 23:13:45    阅读次数:189
将两个有序链表和为另外一个链表,并保证有序
直接递归 代码: #include #include using namespace std; typedef struct listNode{ int key; struct listNode *pNext; } * pNode,Node; void createNode(pNode &pHead){ bool isFirst=true; int temp; sc...
分类:其他好文   时间:2014-07-30 20:57:14    阅读次数:174
循环双链表的简单实现
//代码为自己编写,可能有问题,欢迎大家留言指正! #include #include using namespace std; typedef struct dnode { int val; dnode *prior; dnode *next; }dnode; dnode * create(); void traverse(dnode *pHead); bool insert(dn...
分类:其他好文   时间:2014-07-30 20:56:44    阅读次数:210
CII-2.4指针常量和常量指针
#define T Stack_T typedef struct T *T; struct T { int count; struct elem { void *x; struct elem *link; } *head; } const T stk //指针常量, const修饰struct T *。地址不能变。 const struct T *stk //指向常量的指...
分类:其他好文   时间:2014-07-30 20:56:14    阅读次数:187
三维凸包模版 求三维凸包的表面积和体积
#include #include #include #include #include #include #include using namespace std; #define PR 1e-8 #define N 510 struct TPoint{ double x, y, z; TPoint(){} ...
分类:其他好文   时间:2014-07-30 20:55:34    阅读次数:241
测试赛D - The War(有控制范围的贪心)
#include #include #include using namespace std; struct node{ int x , y ; } p[2600]; int q[1200] ; bool cmp(node a,node b) { return a.y < b.y || ( a.y == b.y && a.x < b.x ) ; } int main() {...
分类:其他好文   时间:2014-07-30 17:44:44    阅读次数:219
单链表操作实例程序
#include #include using namespace std; typedef struct node { int val; node *next; }node; node * create_list(); void traverse_list(node *pHead); int get_len_list(node *pHead); bool delete_list(no...
分类:其他好文   时间:2014-07-30 17:43:54    阅读次数:237
数据结构中构建顺序表
顺序表指的是数据元素在内存中连续分配地址的数组,由于指针无法指出数组长度,编译时不会报错,所有用结构体来表示一个顺序表: 顺序表用C语言的表示方法如下:  #define MaxSize 100 #define OK 1 #define ERROR -1 typedef int elem_type; typedef int Statue; // int Arrylength...
分类:其他好文   时间:2014-07-30 17:36:44    阅读次数:256
从尾到头打印链表
使用数据结构stack或者递归 1 使用stack #include #include using namespace std; typedef struct listNode{ int key; struct listNode *pNext; } * pNode,Node; void createNode(pNode &pHead){ bool isFirst=true;...
分类:其他好文   时间:2014-07-30 17:30:34    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!