码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
逆序链表
#includeusing namespace std;class node{public: node():value(0),next(NULL){} ~node(){} int value; node* next;};///be careful this ;node* cr...
分类:其他好文   时间:2014-05-23 10:06:09    阅读次数:247
UVA 11988 Broken Keyboard (a.k.a. Beiju Text)
题目大意: 输入一个文章,[ 就是把光标放到最前面  ] 把光标放到最后面。 输出最后得到的文章。 思路分析: 用deque 模拟。 #include #include #include #include #define maxn 111111 using namespace std; char str[maxn]; deque Q; deque::itera...
分类:其他好文   时间:2014-05-23 08:12:11    阅读次数:335
hdu 1232 畅通工程
题目:     链接:点击打开链接 算法:     赤裸裸的并查集。 代码: #include #include #include using namespace std; int n,m; int root[1010]; int find(int x) { int r = x; while(root[r] != r) r = root[r]; ...
分类:其他好文   时间:2014-05-22 10:36:30    阅读次数:219
【3】QQ 聊天界面
1.说明 稍微修改了下QQ示例里面的聊天界面界面,然后把代码扣过来完成了QQ聊天界面部分,效果还可以。 2.代码部分 // QQTalk.h文件 #ifndef __QQ_TALK_H__ #define __QQ_TALK_H__ #include #include using namespace DuiLib; #define QQ_TALK_XML _T("ch...
分类:其他好文   时间:2014-05-22 08:37:45    阅读次数:218
12周 项目4
#include using namespace std; class Date { public: Date(int y=0,int m=0,int d=0); void SetDate(int y,int m,int d); void PrintDate(); protected: int year; int month; int day; }...
分类:其他好文   时间:2014-05-22 08:36:19    阅读次数:201
s1考试 图书管理系统 结构体版
#include #include #include #include #include using namespace std; struct Library { long number;//编号 string bookname;//书名 string author;//作者 string press;//出版社 int price;//价格 }...
分类:其他好文   时间:2014-05-22 07:17:38    阅读次数:206
职责链模式、桥接模式
参考资料《大话设计模式》职责链模式:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ds_chainofresponsibility{ class Progr...
分类:其他好文   时间:2014-05-20 12:52:03    阅读次数:328
数据结构-从上往下打印二叉树
题目:从上往下打印出二叉树的每个节点,同一层的节点按照从左到右的顺序打印。分析:其实就是按层的遍历方式#include #include using namespace std;struct BinaryTree{ int data; BinaryTree* lchild; Bin...
分类:其他好文   时间:2014-05-20 10:13:47    阅读次数:242
SqlHelper 简单版
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;namespace AddressBook{...
分类:数据库   时间:2014-05-20 10:08:21    阅读次数:328
数据结构4_链栈
用指针方式实现栈,相对于顺序栈,指针方式不用指定栈的大小,先定义一个栈节点类,再定义一个链栈类,为使链栈类能访问栈节点的元素,设链栈类为栈节点类的友元类。#includeusing namespace std;class LinkStack;class StackNode //设计每个节点的类型{ ...
分类:其他好文   时间:2014-05-20 08:45:15    阅读次数:288
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!