码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
Qt由pcm数据生成wav文件
void AudioGrabber::saveWave(const QString &fileName, const QByteArray &raw, const QAudioFormat &format){ typedef struct{ char riff_fileid[4];//"RIFF" ...
分类:其他好文   时间:2014-05-09 05:01:23    阅读次数:434
HDU 3081 Marriage Match II 二分+最大流
题目来源:HDU 3081 Marriage Match II 题意: 思路:   错误代码 纠结不知道哪错了 先放一放 #include #include #include #include #include using namespace std; const int maxn = 1010; const int INF = 999999999; struct Edg...
分类:其他好文   时间:2014-05-09 02:38:25    阅读次数:264
linux 内核源码分析 - 获取数组的大小
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))   测试程序: #include #include struct dev { int a; char b; float c; }; struct dev devs[]= { { 1,'a',7.0, }, { 1,'a',7.0, }, { ...
分类:系统相关   时间:2014-05-09 02:10:16    阅读次数:494
通过fstat函数判断描述符类型
fstat函数用于返回关于文件的信息到一个struct stat结构中,stat结构中的st_mode可以用来区分文件类型。 struct stat { dev_t st_dev; /* ID of device containing file */ ino_t st_ino; /* inode ...
分类:其他好文   时间:2014-05-09 02:01:26    阅读次数:379
MySQL源码 数据结构array
MySQL源码中自己定义了许多数据结构,放在mysys的目录下,源码中通常都使用这些数据结构来组织存放数据,也更容易实现跨平台。下面先来看下MySQL定义的动态数组:【源代码include/array.h mysys/array.c】typedef struct st_dynamic_array{ ...
分类:数据库   时间:2014-05-08 18:10:32    阅读次数:392
LeetCode -- Remove Duplicates from Sorted List
题目链接简单题,就是从单链表中删除重复元素。附上代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * L...
分类:其他好文   时间:2014-05-08 18:02:52    阅读次数:338
c语言来实现c++
闲来没事,看了看sqlite的源码,突然想用c实现c++,写了如下demo #include #include struct Class; typedef struct Class _Class; struct IMethod { void (*ctor)(_Class *c); void (*dtor)(_Class *c); int (*sum)(_Class* c); in...
分类:编程语言   时间:2014-05-08 16:14:30    阅读次数:363
NOI2007项链工厂——sbTreap代码
1 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 struct node 10 { 11 int data; 12 int le...
分类:其他好文   时间:2014-05-08 10:31:35    阅读次数:362
C++ Primer 学习笔记_62_重载操作符与转换 --调用操作符和函数对象
重载操作符与转换--调用操作符和函数对象引言:    可以为类类型的对象重载函数调用操作符:一般为表示操作的类重载调用操作符!struct absInt { int operator() (int val) { return val > 0 ? val : -val; } }; 通过为类类型的对象提供一个实参表而使用调用操作符,所用的方式看起来系那个一个函数...
分类:编程语言   时间:2014-05-08 08:18:17    阅读次数:503
链队列的C++实现
#include using namespace std; //节点类 template struct QNode { T data; QNode *next; }; //队列类 template struct LinkList { QNode * front; QNode * rear; size_t size; }; //构造一个空队列 template void InitQueu...
分类:编程语言   时间:2014-05-08 03:48:19    阅读次数:346
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!