码迷,mamicode.com
首页 >  
搜索关键字:friend    ( 1299个结果
hdu1873优先队列
1 #include 2 #include 3 using namespace std; 4 struct node 5 { 6 int id; 7 int val; 8 friend bool operatorb.id;15 }16 }17 };1...
分类:其他好文   时间:2015-06-07 17:25:39    阅读次数:95
自定义优先队列
1 #include 2 #include 3 using namespace std; 4 5 6 struct node 7 { 8 friend bool operatory.pre;// > 表示从小到大,q;22 while(scanf("%d",&n)!=EOF)2...
分类:其他好文   时间:2015-06-07 14:34:33    阅读次数:131
[c++]复数的运算符重载
类的定义和声明 #include #include using namespace std; class Complex { friend istream& operator>>(istream &in, Complex &c); friend ostream& operator<<(ostream &out, const Complex &c); friend Com...
分类:编程语言   时间:2015-06-07 09:49:23    阅读次数:179
HDU ACM 1026 Ignatius and the Princess I -> BFS+优先队列+路径打印
分析:在BFS中使用优先队列即可获取最小值。 #include #include using namespace std; //BFS+优先队列(打印路径) #define N 101 struct Node //节点 { int x,y,time; friend bool operator<(const Node& a,const Node& b) //有限队列根据时...
分类:其他好文   时间:2015-06-06 09:13:07    阅读次数:108
类模板友元函数坑死人不偿命的错误
错误例程: #include using namespace std; template class Student { private: T age; public: Student(T age_) :age(age_){} friend bool operator==(const Student& s1, const Student& s2); }; int main() { ...
分类:其他好文   时间:2015-06-05 10:25:00    阅读次数:111
【数据结构】用C++实现双链表的各种操作(包括头删,尾删,插入,逆序,摧毁,清空等等)
//【数据结构】用C++实现双链表的各种操作(包括头删,尾删,插入,逆序,摧毁,清空等等) //头文件 #ifndef _LIST_H #define _LIST_H #include using namespace std; template class DList; template class ListNode { friend class DList; public: ...
分类:编程语言   时间:2015-06-01 09:48:46    阅读次数:154
【数据结构】用C++实现双循环链表的各种操作(包括头删,尾删,插入,逆序,摧毁,清空等等)
//【数据结构】用C++实现单循环链表的各种操作(包括头删,尾删,插入,逆序,摧毁,清空等等) //头文件 #ifndef _CDLIST_H #define _CDLIST_H #include using namespace std; template class CDList; template class ListNode { friend class CDList; p...
分类:编程语言   时间:2015-06-01 09:47:46    阅读次数:123
C++ 数据结构 双链表(模板类)
#ifndef DLIST_H_INCLUDED #define DLIST_H_INCLUDED #include using namespace std; template class DList; template class ListNode { friend class DList; public: ListNode():data(Type()),next(NULL...
分类:编程语言   时间:2015-05-31 18:32:28    阅读次数:146
菜鸟ios开发
- (NSArray *)groups{ if (_groups == nil) { // NSArray *dictArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"friend...
分类:移动开发   时间:2015-05-31 01:18:55    阅读次数:126
POJ 1733 Parity game (并查集)
Parity gameTime Limit:1000MSMemory Limit:65536KTotal Submissions:6816Accepted:2636DescriptionNow and then you play the following game with your friend...
分类:其他好文   时间:2015-05-29 19:57:21    阅读次数:124
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!