码迷,mamicode.com
首页 >  
搜索关键字:using 127.0.0.1 for servername    ( 53996个结果
shoppingCart
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;usin...
分类:其他好文   时间:2014-05-01 13:28:29    阅读次数:274
UVA 315 求割点数
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=251 测模版: #include #include #include #include #include #include using namespace std; #define ...
分类:其他好文   时间:2014-04-29 13:31:21    阅读次数:542
map容器设计
在红黑树基础上设计map容器,在设计map时,可以明显利用的map模板类中KEY,VALUE,KEYOFVALUE的灵活运用 不多说,代码如下: //my_map.h #ifndef MY_MAP_H_INCLUDED #define MY_MAP_H_INCLUDED #include //for pair #include"my_rb_tree.h" using std::pair;...
分类:其他好文   时间:2014-04-29 13:27:21    阅读次数:443
【代码备忘】今天突然写的一个比较奇葩的C++ 代码,模版,friend,友元...
欢迎加入我们的QQ群,无论你是否工作,学生,只要有c / vc / c++ 编程经验,就来吧!158427611  今天突然脑袋一闪,写出这样的代码。 这样就能 不用在Ta中添加friend class , 只要实现Tb 就能访问Ta的private 属性了。 应该是比较奇葩的代码吧 。。。。。 #include using namespace std; template cl...
分类:编程语言   时间:2014-04-29 13:26:21    阅读次数:336
[ACM] hdu 1203 I NEED A OFFER!(小数背包)
解题思路: 求至少收到一份OFFER的最大概率,为了简化问题,求一份OFFER也没有收到的最小概率,然后1减去它就可以了。采用01背包,装入一份OFFER也没收到总概率的最小值,那么1减去它就是收到至少一份OFFER的最大概率。注意:dp[最大容量] 要有值,初始化时,而且本题dp数组初始化值为1 代码: #include #include #include using name...
分类:其他好文   时间:2014-04-29 13:21:22    阅读次数:321
STL源码分析一:组态
#include using namespace std; template class testClass{ public: static int _data; }; int testClass::_data = 1; int testClass::_data = 2; int main() { cout ::_data << endl; cout ::_data << ...
分类:其他好文   时间:2014-04-29 13:21:20    阅读次数:410
socket抓取网页
#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; void func() { string url; cout << "输...
分类:Web程序   时间:2014-04-29 13:21:20    阅读次数:506
poj 2431 Expedition 贪心+最大堆
当油量不够时从走过的油站中选最大加油量的 #include #include #include #include using namespace std; #define MAX_N 10005 struct node{ int dist,fuel; }t[MAX_N]; bool cmp(const node &a,const node &b) { return a.dist<b.dis...
分类:其他好文   时间:2014-04-28 10:44:43    阅读次数:335
大数乘法
大数乘法的步骤(先戳我看看大数加法的思想): 首先我们输入要相乘的2个数字,然后逆序。用2层循环来相乘,把下标[i]*[j]计算的结果放在下标[i*j-1]中(下标从1开始),建议及时处理进位问题(char字符范围比较小)。 最后从高位开始输出。 #include #include #define MAX 1000 using namespace std; void InputN...
分类:其他好文   时间:2014-04-28 10:24:42    阅读次数:371
虚函数
1.虚函数在类内部声明,形式为: virtual (形参列表) 虚函数的声明比普通函数多一个virtual,公有派生类中可以省略virtual关键字,派生类中重写虚函数,必须要求返回值类型形参列表一致,否则会发生同名覆盖。派生类只有在公有继承的方式继承基类时,才会有虚函数的正常使用。使用虚函数的例子: # include using namespace std; # include...
分类:其他好文   时间:2014-04-27 22:22:20    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!