summaryrefslogtreecommitdiffhomepage
path: root/zh-cn
diff options
context:
space:
mode:
Diffstat (limited to 'zh-cn')
-rw-r--r--zh-cn/c++-cn.html.markdown18
1 files changed, 0 insertions, 18 deletions
diff --git a/zh-cn/c++-cn.html.markdown b/zh-cn/c++-cn.html.markdown
index e5c5d5df..e1551e2b 100644
--- a/zh-cn/c++-cn.html.markdown
+++ b/zh-cn/c++-cn.html.markdown
@@ -289,8 +289,6 @@ public:
}; // 在类的定义之后,要加一个分号
-}; // 记住,在类的定义之后,要加一个分号!
-
// 类的成员函数通常在.cpp文件中实现。
void Dog::Dog()
{
@@ -309,22 +307,6 @@ void Dog::setWeight(int dogsWeight)
weight = dogsWeight;
}
-// 虚函数的virtual关键字只需要在声明时使用,不需要在定义时出现
-void Dog::print() const
-{
- std::cout << "Dog is " << name << " and weighs " << weight << "kg\n";
-}
-
-void Dog::~Dog()
-{
- cout << "Goodbye " << name << "\n";
-}
-
-void Dog::setWeight(int dogsWeight)
-{
- weight = dogsWeight;
-}
-
// 虚函数的virtual关键字只需要在声明时使用,不需要在定义时重复
void Dog::print() const
{