RelaxCN
RelaxCN
in the `ex13_44_47.h`, the size and length function is different. ~~~cpp size_t size() const { return end - elements; } size_t length() const { return end - elements - 1;...
https://interviewguide.cn/notes/03-hunting_job/02-interview/01-01-07-basic.html#_128%E3%80%81%E7%94%A8c%E8%AF%AD%E8%A8%80%E5%AE%9E%E7%8E%B0c-%E7%9A%84%E7%BB%A7%E6%89%BF 这一段,用 C 语言的函数指针来模拟继承和多态,为什么 p2 可以直接调用_b 的 _fun() ,但是 _b 只有一个 _A 的对象 `_a_ `,并没有这个函数指针。 ```c //C语言模拟继承与多态的测试 _A _a; //定义一个父类对象_a _B _b; //定义一个子类对象_b _a._fun = _fA; //父类的对象调用父类的同名函数 _b._a_._fun = _fB;...