1 #include 2 #include 3 #include 4 using namespace std; 5 6 template void f(vector&v1,vector&v2) //v2不设为const因为可能v2=v1 习题1 7 { 8 if(v1.c...
分类:
编程语言 时间:
2014-11-11 00:36:49
阅读次数:
280
1 #include "../../st.h" 2 3 class Point{ 4 public: 5 Point():x(0),y(0){} 6 Point(int x1,int y1):x(x1),y(y1){} 7 double re_x(){return x;}...
分类:
编程语言 时间:
2014-11-10 23:15:47
阅读次数:
346
1 #include "../../st.h" 2 3 int main() 4 try{ 5 string s1="a.txt"; 6 string s2="z.txt"; 7 ifstream ifs(s1.c_str()); 8 if(!ifs) 9 ...
分类:
编程语言 时间:
2014-11-10 23:13:57
阅读次数:
311
1 #include 2 using namespace std; 3 4 void to_lower(char* s) 5 { 6 while(*s!='\0') 7 { 8 if(*s>='A'&&*s<='Z') 9 *s+=32;...
分类:
编程语言 时间:
2014-11-10 23:12:22
阅读次数:
323
1 #include "../../st.h" 2 class Name_pairs{ 3 public: ...
分类:
编程语言 时间:
2014-11-10 23:09:03
阅读次数:
461
1 #include "../../st.h" 2 3 int main() 4 { 5 vector nums; 6 double t; 7 int n; 8 cout>n;10 cin>>t;11 nums.push_back(t);12 ...
分类:
编程语言 时间:
2014-11-10 21:41:57
阅读次数:
295
Reflection是Java 程序开发语言的特征之中的一个,它同意执行中的 Java 程序对自身进行检查,或者说"自审",并能直接操作程序的内部属性。比如,使用它能获得 Java 类中各成员的名称并显示出来。 Java 的这一能力在实际应用中或许用得不是非常多,可是在其他的程序设计语言中根本就不存...
分类:
编程语言 时间:
2014-11-10 21:39:10
阅读次数:
361
《javascript高级程序设计》的摘抄Ps:很好的一本书,大家可以直接去看书,这里只是记录。推荐一个计算机电子书网站: 皮皮书屋查资料:MDN,W3CSCHOOL,google匿名函数的执行环境具有全局性,所以 this 指向window函数被调用,其活动对象都自动获得两个特殊变量: this ...
分类:
编程语言 时间:
2014-11-10 21:32:23
阅读次数:
220
1 #include 2 using namespace std; 3 4 int main() 5 { 6 int a=1,b=100; 7 int f=1; 8 char c=0; 9 10 while(f=1)11 {12 cout...
分类:
编程语言 时间:
2014-11-10 21:21:53
阅读次数:
285
Android应用程序由组件组成,组件是可以被调用的基本功能模板。Android系统利用组件实现程序内部或者程序间的模板调用,以解决代码复用的问题,这是Android系统非常重要的特性。在程序设计时,在AndroidManifest.xml中声明可共享的组件,声明后其他应用程序可以直接调用这些共.....
分类:
移动开发 时间:
2014-11-10 21:10:14
阅读次数:
219