结构体初学者都有点小怕其实思维清晰之后你会发现结构体是个非常好的东西,嘿嘿。第一,结构体的定义和初始化。别被书上大量的描述吓到1.怎么定义结构体了例子如下,我们以构建一个包含学生姓名,年龄,Email为例子1 struct 2 {3 char name;4 int age;5 ...
分类:
其他好文 时间:
2014-08-11 00:16:51
阅读次数:
215
问题描述:输入一颗二元查找树,将该树转换为它的镜像树,即对每一个节点,互换左右子树。例如输入: 6/ \4 12/ \ / \25 816输出: 6/ \12 4/ \ / \16852定义二元查找树的结点为:typedef struct BSTree { int dat...
分类:
其他好文 时间:
2014-08-10 23:48:50
阅读次数:
316
通讯录中的一条记录包含下述基本信息:朋友的姓名、出生日期、性别、固定电话号码、移动电话号码。 本题要求编写程序,录入N条记录,并且根据要求显示任意某条记录。输入格式:输入在第1行给出正整数N( 2 #include 3 4 struct tong{ 5 char name[11]; 6 ...
分类:
其他好文 时间:
2014-08-10 21:25:10
阅读次数:
230
1.Echo网络库的编写 1.1 Echo网络库1.0 1.1.1 Echo网络库 1.0 框架分析 a)class InetAddress: 主要用来定义一个struct sockaddr_in 结构(用自定义端口号初始化),并提供获取这个结构体成员如IP、Port等的接口; ...
分类:
系统相关 时间:
2014-08-10 21:24:01
阅读次数:
421
#include #include #include #include #include using namespace std;struct node{ char msg[20]; int a,b;};struct cmp{ bool operator()(const node ...
分类:
其他好文 时间:
2014-08-10 21:17:20
阅读次数:
214
//hnldyhy(303882171) 11:12:46// zoj 1649//bfs +优先队列#include #include #include using namespace std;struct node{ int x; int y; int step;};bool...
分类:
其他好文 时间:
2014-08-10 21:16:00
阅读次数:
342
#include #include #include #include #include #include using namespace std;struct node{ int m,n; // bool f;};node hash[200];char s[1000];int main(...
分类:
其他好文 时间:
2014-08-10 21:10:11
阅读次数:
345
#include struct MyStruct{ MyStruct(int a) { a = b = 0; } int a; int b;};int main(){ MyStruct my = {0};//列表初始化只适合非聚合结构体,所以这样不行...
分类:
其他好文 时间:
2014-08-10 18:11:30
阅读次数:
205
这是我个人写的一个学生管理系统,这是我仅仅用来练手的代码,要知道链表可是你在面试过程中最大机率会考到的,我是陆续从单向链表入门,然后采用双向链表写的代码!如有BUG,请指正,让我们共同进步! 1 #include 2 #include 3 #include 4 struct student ...
分类:
编程语言 时间:
2014-08-10 15:31:30
阅读次数:
345
參考glog写了现有的Logging系统。直接有enum LoggingEnum{LOG_INFO,LOG_DBBUG,LOG_ERROR,LOG_WARNNING,LOG_END};几种等级的日志,实时刷到console上,异步延迟写到日志上,建立队列缓存日志,时间一到一起刷到file,好了,看下...
分类:
其他好文 时间:
2014-08-10 15:22:20
阅读次数:
297