摘要: 7.8a#include using namespace std;const int Seasons=4;const char *season[Seasons]={"Spring","Summer","Fall","Winter"};void fill(double *expenses);void show(const double *);void main78a(){ double expenses[Seasons]; fill(expenses); show(expenses); system("pa 阅读全文
posted @ 2014-04-10 10:28 天下纵横C++ 阅读(129) 评论(0) 推荐(0)
摘要: 1.把C++当成一门新的语言学习(和C没啥关系!真的。); 2.看《ThinkingInC++》,不要看《C++变成死相》; 3.看《TheC++ProgrammingLanguage》和《InsideTheC++ObjectModel》,不要因为他们很难而我们自己是初学者所以就不看; 4.不要被VC、BCB、BC、MC、TC等词汇所迷惑——他们都是集成开发环境,而我们要学的是一门语言; 5.不要放过任何一个看上去很简单的小编程问题——他们往往并不那么简单,或者可以引伸出很多知识点; 6.会用VisualC++,并不说明你会C++; 7.学class并不难,template、STL... 阅读全文
posted @ 2014-04-10 10:09 天下纵横C++ 阅读(170) 评论(0) 推荐(0)
摘要: 7.7//7.修改程序清单7.7中的3个数组处理函数,使之使用两个指针参数来表示区间.//fill_array()函数不返回实际读取了多少个数字,而是返回一个指针,该指针//指向最后被填充的位置;其他的函数可以将该指针作为第二个参数,以标识//数据结尾。#include using namespace std;double *Fill_array(double *arr);////因为是对数组进行操作,所以可以不用返回值;void const Show_array(const double *arr,double *Epoint);void Reverse_array(double *arr, 阅读全文
posted @ 2014-04-10 10:05 天下纵横C++ 阅读(216) 评论(0) 推荐(0)
摘要: 尼玛,不就是昨天中午睡了两个小时么,用得着一晚上都睡不着么。我去啊,早上快6点了才睡着,真是坑死人不偿命啊。昨晚突然想了好多东西。一个人,如果连自己都掌控不了,谈何掌控自己的人生呢。想到那篇文章,《寒门再难出贵子》,其实觉得真的是很现实的一件事情。但是任何事情都会有一丝的转机,只要你立志要改变自己的命运,那就没什么能够阻止你。from now on,go head!2014/4-9 天下无双 于GDUT西三543 阅读全文
posted @ 2014-04-09 11:14 天下纵横C++ 阅读(108) 评论(0) 推荐(0)
摘要: 今天上选修课,师兄提醒我们应该多写博客什么的,其实我觉得这挺不错的。最近看C草草看得好头晕啊,一推的概念,要记的东西好多好多。今晚看了《致我们终将逝去的青春》,感慨挺多的。将来的我会是故事里的谁?我谁都不是,我就是我。我的青春,我做主。虽然说青春就是用来怀念的,但是我还是要努力,不能让青春荒废了。好了,洗澡吧。----2014/4/8天下无双 ----于GDUT 西三543 阅读全文
posted @ 2014-04-08 21:44 天下纵横C++ 阅读(98) 评论(0) 推荐(0)
摘要: 7.6#include using namespace std;void Fill_array(double arr[],int arrSize) ;//因为是对数组进行操作,所以可以不用返回值;void const Show_array(const double arr[],int arrSize);void Reverse_array(double arr[],int arrSize);void main76(){ double arr[10]; Fill_array(arr,10); Show_array(arr,10); Reverse_array(arr,10); system(&q 阅读全文
posted @ 2014-04-08 17:09 天下纵横C++ 阅读(141) 评论(0) 推荐(0)
摘要: 7.5#include using namespace std;long jiecheng(int);void main75(){ cout>n) { long result=jiecheng(n); cout<<"the result of jiecheng "<<n<<"! = "<<result<<endl; cout<<"Please enter the number :"; } system("pause");}long jie 阅读全文
posted @ 2014-04-08 16:47 天下纵横C++ 阅读(224) 评论(0) 推荐(0)
摘要: 7.4#include using namespace std;typedef unsigned int uint;long double probability(uint,uint);void main74(){ long double fildNumber=probability(47,5); long double specialNumber=probability(27,1); cout0;p--,n--) result=result*n/p; return result; } 阅读全文
posted @ 2014-04-08 16:37 天下纵横C++ 阅读(139) 评论(0) 推荐(0)
摘要: 7.3#include using namespace std;struct box{ char marker[40]; float height; float width; float length; float volume;};void show(const box b);void set(box &b);void main73(){ box b[2]={{"mybox",5,6,8,0},{"herbox",10,10,10,0}};//初始化结构数组 cout<<"now the box valus is :&qu 阅读全文
posted @ 2014-04-05 12:55 天下纵横C++ 阅读(183) 评论(0) 推荐(0)
摘要: 7.2#include #include using namespace std;const int ArrSize=10;void const show(const int []);void input(int []);void aveg(const int []);void main72(){ //static int i=0; int result[ArrSize]; cout>results; for(;i=0;i++) { result[i]=results; cout>results; //if(result) //break; } result[i]='\0& 阅读全文
posted @ 2014-04-01 13:01 天下纵横C++ 阅读(143) 评论(0) 推荐(0)