摘要: p475.2//头文件:class Cd{private: char *performers; char *label; int selections; double playtime;public: Cd(char *s1, char *s2, int n, doub... 阅读全文
posted @ 2015-05-26 16:37 pioneer1132203 阅读(213) 评论(0) 推荐(0) 编辑
摘要: p427.4 1 //头文件: 2 #include 3 #ifndef STACK_H_ 4 #define STACK_H_ 5 typedef unsigned long Item; 6 7 class Stack{ 8 private: 9 enum{MAX=10... 阅读全文
posted @ 2015-05-26 16:31 pioneer1132203 阅读(154) 评论(0) 推荐(0) 编辑
摘要: p425.1 1 #include 2 #include 3 #include 4 using namespace std; 5 6 class Cow{ 7 char name[20]; 8 char *hobby; 9 double weight;10 public:1... 阅读全文
posted @ 2015-05-26 16:26 pioneer1132203 阅读(174) 评论(0) 推荐(0) 编辑
摘要: p333.7 1 #include 2 #include 3 #include 4 using namespace std; 5 6 class Plorg{ 7 private: 8 char fullname[19]; 9 int CI;10 public:11 Plo... 阅读全文
posted @ 2015-05-26 16:20 pioneer1132203 阅读(187) 评论(0) 推荐(0) 编辑
摘要: p333.3 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class Golf{ 8 private: 9 static const int Len = 40;10 char full... 阅读全文
posted @ 2015-05-26 16:13 pioneer1132203 阅读(211) 评论(0) 推荐(0) 编辑
摘要: p296.3 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 struct chaff 8 { 9 char dross[20];10 int slag;11 };12 v... 阅读全文
posted @ 2015-05-26 16:06 pioneer1132203 阅读(158) 评论(0) 推荐(0) 编辑
摘要: p221.8 1 #include 2 #include 3 #include 4 using namespace std; 5 const int SLEN = 30; 6 struct student{ 7 char fullname[SLEN]; 8 char hobby[SL... 阅读全文
posted @ 2015-05-26 16:03 pioneer1132203 阅读(150) 评论(0) 推荐(0) 编辑
摘要: c++ primer plus 习题答案用的是第五版,IDE仍然是vs2013。我只标注了题号,具体的题目找下书上对应内容吧。p110.8 1 #include 2 #include 3 #include 4 char* getname(char*); 5 6 struct pissza { 7 ... 阅读全文
posted @ 2015-05-26 15:56 pioneer1132203 阅读(514) 评论(0) 推荐(0) 编辑
摘要: p421.5 1 #include 2 #include 3 #define CSIZE 4 4 #define SCORE 3 5 6 void get_info(struct students *p); 7 void get_average(struct students *p); 8 voi... 阅读全文
posted @ 2015-05-24 22:25 pioneer1132203 阅读(292) 评论(0) 推荐(0) 编辑
摘要: p376.7A方案 1 #include 2 #include 3 #define LEN 40 4 void rank(FILE *, FILE *); 5 int main(void) 6 { 7 FILE *fp, *fc; 8 int ch, bp; 9 char f... 阅读全文
posted @ 2015-05-24 22:22 pioneer1132203 阅读(232) 评论(0) 推荐(0) 编辑