摘要:
虚函数概念: 在类的定义中,前面有virtual关键字的成员函数就是虚函数。 virtual关键字只用在类定义里的函数声明中,写函数体时不用。 构造函数和静态成员函数不能是虚函数。 多态的表现形式: 1) 派生类的指针可以赋给基类指针。 通过基类指针可以调用基类和派生类中的同名虚函数时:指针指向哪个 阅读全文
摘要:
题目描述: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting a 阅读全文