随笔分类 - 学习C++
记录c++学习过程
摘要:1 // chapter18.h 2 3 #ifndef LEARN_CPP_CHAPTER18_H 4 #define LEARN_CPP_CHAPTER18_H 5 6 #include <iostream> 7 #include <initializer_list> 8 9 template<
阅读全文
摘要:1 // chapter17.h 2 3 #ifndef LEARN_CPP_CHAPTER17_H 4 #define LEARN_CPP_CHAPTER17_H 5 6 #include <iostream> 7 #include <fstream> 8 #include <vector> 9
阅读全文
摘要:1 // chapter16.h 2 3 4 #ifndef LEARN_CPP_CHAPTER16_H 5 #define LEARN_CPP_CHAPTER16_H 6 7 #include <iostream> 8 #include <string> 9 #include <cctype> 1
阅读全文
摘要:1 // chapter15_1_tvremote.h 2 3 #ifndef LEARN_CPP_CHAPTER15_1_TVREMOTE_H 4 #define LEARN_CPP_CHAPTER15_1_TVREMOTE_H 5 class Remote; 6 class Tv { 7 pri
阅读全文
摘要:1 // chapter14_1_wine.h 2 3 #ifndef LEARN_CPP_CHAPTER14_1_WINE_H 4 #define LEARN_CPP_CHAPTER14_1_WINE_H 5 6 #include <valarray> 7 #include <string> 8
阅读全文
摘要:1 // chatper13_1_cd.h 2 3 #ifndef LEARN_CPP_CHAPTER13_1_CD_H 4 #define LEARN_CPP_CHAPTER13_1_CD_H 5 6 7 class Cd { 8 private: 9 char performers[50]; 1
阅读全文
摘要:1 // chapter12_1_cow.h 2 3 4 #ifndef LEARN_CPP_CHAPTER12_1_COW_H 5 #define LEARN_CPP_CHAPTER12_1_COW_H 6 7 class Cow { 8 private: 9 char name_[20]; 10
阅读全文
摘要:最近开学,事情较多,过两天更新。。。
阅读全文
摘要:1 // chapter10_1_account.h 2 3 #ifndef LEARN_CPP_CHAPTER10_1_ACCOUNT_H 4 #define LEARN_CPP_CHAPTER10_1_ACCOUNT_H 5 6 #include <iostream> 7 #include <s
阅读全文
摘要:1 // chapter09_golf.h 2 3 #ifndef LEARN_CPP_CHAPTER09_GOLF_H 4 #define LEARN_CPP_CHAPTER09_GOLF_H 5 6 #include <cstring> 7 #include <iostream> 8 9 con
阅读全文
摘要:1 void ch8_1_print(const std::string & str, int n = 0 ) { 2 using namespace std; 3 static int flag = 0; 4 ++ flag; 5 if (!n) 6 cout << str << endl; 7
阅读全文
摘要:1 double ch7_1_harmonicaverage(double a, double b) { 2 return 2 / (1 / a + 1 / b); 3 } 4 5 void ch7_1() { 6 using namespace std; 7 double a{0}, b{0};
阅读全文
摘要:1 void ch6_1() { 2 using namespace std; 3 char ch; 4 while ((ch = cin.get()) != '@') { 5 if (isdigit(ch)) 6 continue; 7 else if (islower(ch)) 8 ch = t
阅读全文
摘要:1 void ch5_1() { 2 using namespace std; 3 int small, big, sum{0}; 4 cout << "enter small and big: " << endl; 5 cout << "small: "; cin >> small; 6 cout
阅读全文
摘要:1 void ch4_1() { 2 using namespace std; 3 string fname, lname; 4 char grade; 5 unsigned int age; 6 cout << "enter first name: "; 7 getline(cin, fname)
阅读全文
摘要:1 void ch3_1() { 2 using namespace std; 3 unsigned int factor = 12; 4 unsigned int inch, feet; 5 cout << "enter your height in inch:______\b\b\b\b\b\b
阅读全文
摘要:1 void ch2_1() { 2 using namespace std; 3 cout << "xxxxxxxx" << endl; 4 } 5 6 void ch2_2() { 7 using namespace std; 8 double num; 9 cout << "please in
阅读全文

浙公网安备 33010602011771号