码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
搜索算法思考
概述:本文主要讲述一些搜索算法的使用,以及其中奥妙思想的思考。 一:广度搜索与深度搜索---BFS与DFS 1:实现算法导论中的BSF #include #define MAX 1000000struct Node{ int d; int p; int color; int id;};int _tm...
分类:其他好文   时间:2014-07-16 23:08:16    阅读次数:224
struct timeval 计时问题
linux编程中,如果用到计时,可以用struct timeval获取系统时间。struct timeval的函数原型如下: struct timeval { __kernel_time_t tv_sec; /* seconds */ __kernel_suseconds_t tv_usec; /*...
分类:其他好文   时间:2014-07-10 14:30:22    阅读次数:334
【POJ】1056 IMMEDIATE DECODABILITY
字典树水题。 1 #include 2 #include 3 #include 4 5 typedef struct Trie { 6 bool v; 7 Trie *next[2]; 8 } Trie; 9 10 Trie *root;11 12 bool create(c...
分类:其他好文   时间:2014-07-10 14:20:40    阅读次数:199
计算结构体首地址的技巧
struct ABC{ int a; int b; int c;};+----------+ member_name )【分析】:(1) 该宏中,struct_type为结构体类型,member_name为结构体内的变量名 (2) ((struct_type *)0) 是欺骗编...
分类:其他好文   时间:2014-07-10 14:19:59    阅读次数:186
【POJ】2418 Hardwood Species
简单字典树。 1 #include 2 #include 3 #include 4 5 #define MAXN 128 6 7 typedef struct Trie { 8 int count; 9 Trie *next[MAXN];10 Trie() {11 ...
分类:其他好文   时间:2014-07-10 13:43:34    阅读次数:239
C语言练手自己编写学生成绩管理系统
#include#include/*定义学生结构体*/struct Student{ char ID[20]; char Name[20]; float Mark1; float Mark2; float Mark3; float Avarage;};/*声明学生...
分类:编程语言   时间:2014-07-10 12:16:39    阅读次数:298
typedef struct与struct定义结构体
今天在定义结构体的时候发现typedef struct与struct定义结构体有一些不同之处: 结构也是一种数据类型, 可以使用结构变量, 因此,  象其它 类型的变量一样, 在使用结构变量时要先对其定义。    定义结构变量的一般格式为:         struct 结构名         {                 类型  变量名;                 类...
分类:其他好文   时间:2014-06-28 08:50:46    阅读次数:147
快速入门C#编程之struct和class对比
1、下面是一个结构的定义: public struct Point { public int X { get; set; } public int Y { get; set; } } 什么时候用结构: 用于小型的数据结构 其中的值一般不修改...
分类:其他好文   时间:2014-06-28 08:38:41    阅读次数:164
STL 队列 、优先队列、栈 小结
学长说现在基本上可以开始学习STL中一些标准模板了,今天先总结一下 队列、栈、优先队列 1、队列(queue)       先进先出原则,头文件#include ,定义结构queue名称;queueq、queueq等; 如: struct node { int x; }f; queueq;//结构体类型队列 q.push(f) //将f压入队列的尾部 node t...
分类:其他好文   时间:2014-06-28 08:36:49    阅读次数:162
给定单向链表的头指针和一个结点指针,定义一个函数在O(1)时间删除该结点
#include #include #include #include using namespace std; struct Node { int data; struct Node* next; }; struct Node* create_list(int len) { if (len <= 0) return NULL; struct Node* head; ...
分类:其他好文   时间:2014-06-27 23:54:36    阅读次数:311
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!