码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
二叉树非递归访问
二叉树非递归访问,借助一个栈,来模拟递归调用过程。struct TreeNode { char val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL...
分类:其他好文   时间:2014-05-26 22:25:25    阅读次数:353
Linux 设备驱动程序 proc seq
不能再简化 1 #include 2 #include 3 4 #include 5 #include 6 #include 7 void * meng_seq_start(struct seq_file*s,loff_t*pos) 8 { 9 if(*pos>1)10 ...
分类:系统相关   时间:2014-05-26 15:20:31    阅读次数:351
链表的排序 (选择和冒泡)
无聊写了个单链表排序,不是很难。但是插入写起来很麻烦,都没有,本文全部是将链表中节点值互换,不改变结构,所以很容易写出来 #includeusing namespace std;struct node{ int n; struct node* next;};//创建链表void swap(int &...
分类:其他好文   时间:2014-05-26 14:52:14    阅读次数:227
基本数据结构
链表struct Node{int data;//数据域struct Node *next;//指针域};//基本操作:创建,插入,删除,打印[百科示例]无需事先知晓链表数据的长度,充分利用内存空间,事先灵活的内存动态管理。链表允许插入和移除表上任意位置上的节点,但是不允许随机存取。因为它包含指向另...
分类:其他好文   时间:2014-05-26 14:16:31    阅读次数:357
约瑟夫环 c++ 循环输入
#include#include#include#include using namespace std;template class joseph{ struct node { T data; node * next; node():next(...
分类:编程语言   时间:2014-05-26 13:58:27    阅读次数:215
通过C语言获取MAC地址(转)
原文:http://blog.chinaunix.net/uid-25885064-id-3125167.html#include #include #include #include #include int get_mac(char* mac){ int sockfd; struct ifreq...
分类:编程语言   时间:2014-05-26 13:52:46    阅读次数:285
zoj3675 BFS+状态压缩
#include #include #include using namespace std;int n;int vis[10000000];int mode1,mode2;struct node{ int step,status;};void print(int x){ int tmp...
分类:其他好文   时间:2014-05-26 13:50:43    阅读次数:262
poj2398Toy Storage
同poj2318! 1 //Accepted 220 KB 0 ms 2 #include 3 #include 4 #include 5 using namespace std; 6 const int MAXN = 1005; 7 struct node 8 {...
分类:其他好文   时间:2014-05-26 12:39:06    阅读次数:242
Linux下用C实现域名到IP的转换(域名解析)
只需调用一个函数即可gethostbyname(),gethostbyname()返回对应于给定主机名的包含主机名字和地址信息的hostent结构指针。结构的声明与gethostaddr()中一致。下面是函数原型: Windows平台下 #include struct hostent FAR *PA...
分类:系统相关   时间:2014-05-26 11:27:30    阅读次数:324
<C++>创建窗口
Step 1:WNDCLASStypedef struct _WNDCLASS{ UINT style; WNDPROC lpfnWndProc; int cbClsExtra; int cbWndExtra; ...
分类:编程语言   时间:2014-05-26 11:02:57    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!