#include <iostream> #include <functional> using namespace std; int fun(int a) { std::cout << a <<std::endl; ; } int fun1(std::function<int(int)>* f) { auto fun = *f; fun(); ; } int main() { std::function<int(int)> funf;…
#include <iostream> #include <functional>//std::bind返回函数对象 void fun1(int a, int b) { std::cout << a << b << std::endl; } using namespace std::placeholders; class A { public: void fun2(int a, int b) { std::cout << a <…
C#复习⑤ 2016年6月19日 22:39 Main Inheritance 继承 1.继承的语法结构 class A { // base class int a; public A() {...} public void F() {...} } class B : A { // subclass (inherits from A, extends A) int b; public B() {...} public void G() {...} } C#中类的继承只能是单继承,在Java中也只…