自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 模板函数

#include<iostream>#include<string>using namespace std;template<typename T>void Swap(T &a, T &b);int main(){ string i = "abc", j = "cba"; cout << i <&

2019-02-22 10:09:08 102

原创 C++ primer plus 学习,函数--默认参数

#include<iostream>#include<string>using namespace std;char* left(const char* str, int n = 4);//设置默认参数n=4int main(){ char str[20]; cin.get(str,20); char *ps = left(str, 8);//n=8,主动赋...

2019-02-22 10:08:16 145

原创 函数参数传引用与传指针

#include<iostream>#include<string>using namespace std;void swapr(int &a, int &b);void swapp(int* a, int* b);int main(){ int left=123, right=321; cout << "no swap:\t" ...

2019-02-22 10:06:58 279

原创 学习C++ Primer Plus 深入探讨函数指针示例记录

#include<iostream>#include<string>using namespace std;const double * f1(const double ar[], int n);//f1返回ar,*ar=1112.3const double * f2(const double [], int);//f2返回ar+1,*(ar+1)=1542.6c...

2019-02-15 11:29:26 217

原创 C++ Void函数指针运用(无参数无返回值)

#include<iostream>#include<string>using namespace std;void happy(void);void unhappy(void);void mood(void(*pf)(void));int main(){ cout << "If you think someone make you happy:...

2019-02-13 15:29:31 3500

转载 C++函数指针示例

#include<iostream>#include<string>//#include<fstream>//#include<math.h>using namespace std;double betsy(int);double pam(int);void estimate(int lines, double(*pf)(int));...

2019-02-13 14:53:02 251

转载 记录C++ primer plus 学习函数递归示例代码

#include<iostream>#include<string>//#include<fstream>//#include<math.h>using namespace std;const int Len = 66;const int Divs = 6;void subdivide(char ar[], int low, int h...

2019-02-13 09:40:27 179

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除