码迷,mamicode.com
首页 >  
搜索关键字:struct    ( 18973个结果
线程的互斥锁和条件变量通信机制
1 #include 2 #include 3 #include 4 #include 5 6 #define BUFFER_SIZE 2 7 struct prodcons 8 { 9 int buffer[BUFFER_SIZE]; 10 pthre...
分类:编程语言   时间:2014-06-18 21:15:32    阅读次数:223
iOS客户端流量统计
自己统计流量的话 需要判断是3G访问还是WIFI访问用 NSURLProtocol自定义一个这个累计DATA就是下行流量#include #include #include #include BOOL success; struct ifaddrs *addrs; const struc...
分类:移动开发   时间:2014-06-18 20:51:23    阅读次数:323
iOS学习笔记---c语言学习第七天
结构体结构体是一种自定义的数据类型struct 结构体名{ 类型说明符 成员名; … 类型说明符 成员名;};#import int main(int argc, const char * argv[]){ struct teacher{ char name[30]; ...
分类:移动开发   时间:2014-06-18 19:42:08    阅读次数:413
如何写一个处理多媒体的中间库
这里实现一个简单的多媒体数据流的处理库,它是以Filter的思想来实现的,通过Filter可以实现多路数据采集,处理和输出;一. 如何实现一个filter1.定义一个Filter descripter 结构,它包含了Filter的主要属性和行为;typedef struct McFilterDesc...
分类:其他好文   时间:2014-06-18 17:14:32    阅读次数:202
python调用c代码2
1、生成动态链接库[root@typhoeus79 c]# more head.c #include #include typedef struct _point{ int x; int y;}Point;Point * InitPoint(int x,int y){ Point ...
分类:编程语言   时间:2014-06-18 15:45:00    阅读次数:267
swift 构造过程
在同一个结构体中,定义不同的构造函数,如果传值类型相同,但是外部名称不一样,可以当做不同的构造函数,这就java的区别很大,例子如下:struct Celsius { var temperatureIC: Double = 0.0 init(fF fahrenheit: Double){ ...
分类:其他好文   时间:2014-06-18 15:32:04    阅读次数:181
【C语言天天练(十)】结构体
引言:数据经常以成组的形式存在。在C中,使用结构可以把不同类型的值存放在一起。 结构的声明有两种 1、struct SIMPLE{ int a; char b; float c; };然后用标签SIMPLE去声明结构体变量。 2、typedef struct{ int a; char b; float c; }Simple;然后用Simple去声明结构体变量。此时Simple...
分类:编程语言   时间:2014-06-17 23:22:29    阅读次数:200
2续hdu1009
#include#includeusing namespace std;struct Food{ double x,y;}food[1005]; int cmp(Food i,Food j){ return i.x*j.y>j.x*i.y;}int main(){ double s,m; int i...
分类:其他好文   时间:2014-06-17 15:31:19    阅读次数:160
单链表
#include "stdafx.h"#include "stdlib.h"typedef struct Node{ int data; struct Node* next;} LinkNode;void PrintNodes(LinkNode *&List){ LinkNode ...
分类:其他好文   时间:2014-06-17 15:25:14    阅读次数:158
leetcode - Binary Tree Preorder Traversal && Binary Tree Inorder Traversal && Binary Tree Postorder Traversal
简单来说,就是二叉树的前序、中序、后序遍历,包括了递归和非递归的方法前序遍历(注释中的为递归版本): 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct TreeNode 9 {1...
分类:其他好文   时间:2014-06-17 12:53:42    阅读次数:416
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!