C++程序设计原理与实践 第十二~十六章 二十五章

摘要: 小弟不才 把filk包安装好了 也用了作者的头文件 但是一直错误错误= =弄了好几天 实在没办法了 打算以后选完MFC再回来学这一部分但其中内容大致都看了 有些后面会用到 题就全没做= =嵌入式我最讨厌了= =所以我直接跳过了 阅读全文
posted @ 2014-11-10 22:39 月巴巴 阅读(197) 评论(0) 推荐(0)

C++程序设计原理与实践 第十一章部分答案

摘要: 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 ... 阅读全文
posted @ 2014-11-10 22:27 月巴巴 阅读(437) 评论(0) 推荐(0)

C++程序设计原理与实践 第十章部分答案

摘要: 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;}... 阅读全文
posted @ 2014-11-10 22:20 月巴巴 阅读(480) 评论(0) 推荐(0)

C++程序设计原理与实践 第九章部分答案

摘要: 1 #include "../../st.h" 2 class Name_pairs{ 3 public: ... 阅读全文
posted @ 2014-11-10 22:15 月巴巴 阅读(1209) 评论(0) 推荐(0)

C++程序设计原理与实践 第八章部分答案

摘要: 1 #include "../../st.h" 2 3 void fibonacci(int x,int y,vector&v,int n) 4 { 5 v.push_back(x); 6 v.push_back(y); 7 int z; 8 for(int i=... 阅读全文
posted @ 2014-11-10 22:06 月巴巴 阅读(559) 评论(0) 推荐(0)

C++程序设计原理与实践 第七章部分答案

摘要: 1 //原书本代码 2 #include "../../st.h" 3 4 const char number='8'; 5 const char quit = 'q'; 6 const char print=';'; 7 const char name = 'a'; 8 con... 阅读全文
posted @ 2014-11-10 21:26 月巴巴 阅读(547) 评论(0) 推荐(0)

C++程序设计原理与实践 第六章部分答案

摘要: 1 //想了许久 2 #include "../../st.h" 3 4 int f=0; //判断句子是否正确 5 6 void sent(); 7 8 void conj() 9 {10 string st;11 cin>>st;12 if(st=="and"... 阅读全文
posted @ 2014-11-10 21:05 月巴巴 阅读(390) 评论(0) 推荐(0)

C++程序设计原理与实践 第五章部分答案

摘要: 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 ... 阅读全文
posted @ 2014-11-10 20:26 月巴巴 阅读(529) 评论(0) 推荐(0)

c++程序设计原理与实践 第四章部分答案

摘要: 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... 阅读全文
posted @ 2014-11-10 20:14 月巴巴 阅读(666) 评论(0) 推荐(0)

一道简单题

摘要: 关键是要排序,如AABBBBC,然后可比较,当相同时将当前位置向后移,而不增加统计数目,不同时增加统计数目,再退出第二循环,这样就可以统计了。 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n... 阅读全文
posted @ 2014-06-11 14:59 月巴巴 阅读(177) 评论(0) 推荐(0)