码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
自定义网络消息
#define MSG_HEAD_LEN 4//消息头部结构typedef struct tagMsg { //消息类型 u16 type; //消息体长度 u16 length;}TMsg;void receive(SOCKET s){ char buffer[1024*28]; //CServM...
分类:其他好文   时间:2014-06-06 11:25:33    阅读次数:243
Insertion Sort List
Sort a linked list using insertion sort./** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNo...
分类:其他好文   时间:2014-06-06 10:39:38    阅读次数:212
linux 统计 程序 运行时间
测试 代码运行时间linux 中的 中 有个函数可以获取当前时间,精确到 微秒 ----> gettimeofday() 1 #include // int gettimeofday(struct timeval *tv, struct timezone *tz); 2 /***...
分类:系统相关   时间:2014-06-06 09:10:48    阅读次数:248
next enum in swift
```cppenum Iter: Int{ case s1=0, s2, s3, s4 mutating func next(){ if self == .s4 { self = .s1 return } ...
分类:其他好文   时间:2014-06-06 09:07:38    阅读次数:215
Swift 枚举和结构
枚举 使用enum创建枚举——注意 Swift 的枚举可以关联方法: 1 enum Rank: Int { 2 case Ace = 1 case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten 3 case Jack, Q...
分类:其他好文   时间:2014-06-06 08:30:54    阅读次数:285
单链表操作
#include#includetypedef struct Node{ int data; struct Node *next;}LinkList;//就地反转int LinkListRerverse(LinkList *head){ LinkList *q,*p; p = head->next;...
分类:其他好文   时间:2014-06-06 07:35:54    阅读次数:283
链表中的指针运用(利用2个例子来说明)
示例代码注重这里p1的作用以下代码是用尾插法添加结点#include #include #define N sizeof (STU)typedef struct stu{ int num; char name[20];} STU, * PSTU;PSTU creat (PSTU head) ...
分类:其他好文   时间:2014-06-05 19:49:50    阅读次数:351
三元组
三元组表的C++语言描述基本运算的算法——建立稀疏矩阵的三元组表的算法、按矩阵的列序转置算法、按矩阵的行序转置算法#includeusing namespace std;template class sanyuanzu{ private: struct Node {...
分类:其他好文   时间:2014-06-05 18:29:41    阅读次数:318
十字链表
十字链表的语言描述基本运算的算法——建立稀疏矩阵的十字链表的算法、输出稀疏矩阵十字链表的算法#includeusing namespace std;template class shizi{private: struct Node { int i; int j...
分类:其他好文   时间:2014-06-05 18:25:08    阅读次数:272
poj 1860
题意:给定N中货币 两种货币之间可以兑换 并且收取一定的费用 问 给定你一种货币与数量 是否能兑换到原来的货币 使自己的货币增加思路:用bellman算法 判断是否有回路不断的增大;#include#includeusing namespace std;struct Node{ int u,v; d...
分类:其他好文   时间:2014-06-05 18:18:16    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!