![240](https://cdn2.jianshu.io/assets/default_avatar/4-3397163ecdb3855a0a4139c34a695885.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240)
IP属地:山东
#include //成员函数适配器 #include using namespace std; class Person{ public: ...
#include //函数指针适配器 #include using namespace std; void printVector(int i,...
#include //取反适配器--一元取反 #include using namespace std; class GreatThanFive...
//适配器 #include using namespace std; class MyPrint:public binary_function...
类内实现: 结果为: 友元函数的类外实现: 结果为:
Person模板类: 作为参数的三种格式:
代码如下: 打印结果:
代码如下: struct NodeList{ int data; struct NodeList * next; }; void tes...