0、序言名字空间是C++提供的一种解决符号名字冲突的方法。一个命令空间是一个作用域,在不同名字空间中命名相同的符号代表不同的实体。通常,利用定义名字空间的办法,可以使模块划分更加方便,减少模块间的相互影响。1、名字空间的成员定义在名字空间中的实体称为名字空间的成员。名字空间内的名字可以被该名字空间内...
分类:
编程语言 时间:
2014-05-09 10:45:40
阅读次数:
408
过程式析构:测试案例:test.cpp#include using namespace
std;class Test{public: Test(int dt=0){data=dt;} ~Test(){coutusing namespace
std;class Test{public: Test...
分类:
编程语言 时间:
2014-05-09 03:52:15
阅读次数:
374
一 :
创建自定义的值提供器(IValueProvider接口定义了值提供器)==目的==>把"自己的数据源"添加到绑定过程中.
自定义值提供器就需要实现IValueProvider接口. namespace System.Web.Mvc{ /// /// Defines the
methods t...
分类:
其他好文 时间:
2014-05-09 03:51:50
阅读次数:
403
Reflection 反射需要引用using System.Reflection; 命名空间。
通过Assembly 类的 Load( ); 加载指定的 程序集 Assembly 是不能被实例化, 所以能通过调用静态方法Load();加载指定程序集。
通过GetType()RefLiuyl...
分类:
Web程序 时间:
2014-05-09 03:36:17
阅读次数:
444
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Net.Mail;namespace MailGet{ public
class Utility ...
分类:
其他好文 时间:
2014-05-09 03:30:26
阅读次数:
269
题目链接题意 : 求n的n次方的个位数是多少。思路 :
自己写一下看一下规律,会发现0,1,5,6的个位数怎么乘都是原来这个数,剩下的数也还是有规律。 1 #include 2 #include 3 #include
4 5 using namespace std ; 6 7 int a[...
分类:
Web程序 时间:
2014-05-09 03:13:46
阅读次数:
341
1. ConfigurationManager的命名空间:using
System.Configuration;2.To be able to save you have to use a configuration object
returned by the OpenExeConfigurati...
分类:
移动开发 时间:
2014-05-09 03:03:07
阅读次数:
596
#include#include#include#includeusing namespace
std;const int M=1000;int main(){ string china; int
a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:
其他好文 时间:
2014-05-08 23:27:02
阅读次数:
540
#include using namespace std;void CountSort(int*
a,int k,int n){ int s = 1; for(int i=0;i=0;i--){ tmp1 = a[i]; tmp2 = a[i] % s;
...
分类:
其他好文 时间:
2014-05-08 22:42:33
阅读次数:
382
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1686
题意:
输入t,是测试组数。每组测试,依次输入 字符串s1和s2。求出s2中s1的个数,可以有重叠。
思路:
KMP算法。
代码:
#include
#include
#include
using namespace std;
char s1[1001...
分类:
其他好文 时间:
2014-05-08 15:55:31
阅读次数:
285