04 2018 档案

摘要:#include using namespace std;class Point{private: int x,y;public: Point(int a,int b=0){ x=a;y=b; cout<<"normal"<<e... 阅读全文
posted @ 2018-04-30 17:42 UnderScrutiny 阅读(173) 评论(0) 推荐(0)
摘要:#include using namespace std;class a{private: int i;public: a(int n):i(n){ cout<<"constructing"<<endl; } ~a(){ ... 阅读全文
posted @ 2018-04-30 17:31 UnderScrutiny 阅读(336) 评论(0) 推荐(0)
摘要:#include using namespace std;class Point{private: int x,y;public: Point(int a,int b=0){ x=a;y=b; cout<<"normal"<<e... 阅读全文
posted @ 2018-04-30 09:07 UnderScrutiny 阅读(113) 评论(0) 推荐(0)
摘要:#include using namespace std;int &f(int &i){ i=i+10; return i;}int main(){ int k=0; int &m=f(k); cout<<k<<endl; m=20... 阅读全文
posted @ 2018-04-28 23:03 UnderScrutiny 阅读(95) 评论(0) 推荐(0)
摘要:#include using namespace std;int &max1(int &num1,int &num2){ return (num1>num2)?num1:num2;}int &min1(int &num1,int &num2){ retur... 阅读全文
posted @ 2018-04-28 22:16 UnderScrutiny 阅读(211) 评论(0) 推荐(0)
摘要:#include using namespace std;int a[]={1,3,5,7,9};int &index(int i){ return a[2];}int main(){ cout<<index(2)<<endl; cout<<a[2]... 阅读全文
posted @ 2018-04-28 21:08 UnderScrutiny 阅读(270) 评论(0) 推荐(0)
摘要:h文件#pragma once#include using namespace std;typedef int E;typedef char T;const int defaultVertices = 30;struct Edge { int dest; E cost... 阅读全文
posted @ 2018-04-27 17:00 UnderScrutiny 阅读(246) 评论(0) 推荐(0)
摘要:#include using namespace std;int main(){ int x=25; cout<<hex<<x<<' '<<dec<<x<<' '<<oct<<x<<'\n'; return 0;} 阅读全文
posted @ 2018-04-26 20:51 UnderScrutiny 阅读(245) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std;int main(){ ofstream fout("test.txt",ios::out); if(!fout){ cout#include us... 阅读全文
posted @ 2018-04-25 21:46 UnderScrutiny 阅读(153) 评论(0) 推荐(0)
摘要:#include #include #include #include using namespace std;char toRight(char ch){ switch(ch){ case '{': return '}'; case... 阅读全文
posted @ 2018-04-25 21:29 UnderScrutiny 阅读(288) 评论(0) 推荐(0)
摘要:#include #include using namespace std;struct list{ char course[15]; int score;};int main(){ list list2[2]; ifstream in("f4... 阅读全文
posted @ 2018-04-24 09:04 UnderScrutiny 阅读(88) 评论(0) 推荐(0)