[PCS] Hw.3

Many people think they are full of neobility, and like to play dranbility, which only reflect their shability.

虚函数, 用 virtual 关键字修饰的 member function. 其用于实现多态性 (Polymorphism), 即将接口与实现进行分离, 因个体差异,对相同要求采用不同的策略。

代码:

#include <studio.h>

void lengthOf(T prmt){
  cout sizeof(prmt);
}

int main(){
  int a;
}

小结论:

    pointer的数据类型长度恰好与内存有关,32位最大内存2^32个字节(4Gb),每个字节的地址恰能用不同的32位二进制数表示,即占4个字节,这就是32位操作系统pointer的数据类型长度,自然64位下也就与之不同了。

原文地址:https://www.cnblogs.com/cragoncanth/p/6688261.html