接口继承和实现继承不同。在 public 继承下, derived classes 总是继承 base class 的接口
class Shape{
public:
virtual void draw() const = 0;
virtual void error(const std::string &msg);
int objectID() const;
//...
};
class Rectangle: public Shape{...};
class Ellipse: public Sha...
分类:
编程语言 时间:
2014-07-12 23:42:27
阅读次数:
251
(一)
class Shape {
public:
virtual void draw() const = 0;
virtual void error(const string& msg);
int objectID() const;
};
class Rectangle : public Shape {...};
class Ellipse : publi...
分类:
编程语言 时间:
2014-06-30 00:55:48
阅读次数:
409
1. 基本查询: 构造查询数据。 > db.test.findOne() { "_id" : ObjectId("4fd58ecbb9ac507e96276f1a"), "name" : "stephen", "age" : 35, "genda" : "male", "email" : "step...
分类:
数据库 时间:
2014-06-28 17:08:13
阅读次数:
273
1、一个文档如下db.posts.find(){ "_id" :
ObjectId("5388162dfc164ee1f39be37f"), "title" : "Java Example", "content" :
"This is a example for Java!", ...
分类:
数据库 时间:
2014-05-31 21:50:28
阅读次数:
396