diff options
Diffstat (limited to 'zh-cn/c++-cn.html.markdown')
-rw-r--r-- | zh-cn/c++-cn.html.markdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zh-cn/c++-cn.html.markdown b/zh-cn/c++-cn.html.markdown index e1551e2b..87951bc3 100644 --- a/zh-cn/c++-cn.html.markdown +++ b/zh-cn/c++-cn.html.markdown @@ -188,7 +188,7 @@ int main() cout << "Your favorite number is " << myInt << "\n";
// 显示“Your favorite number is <myInt>”
- cerr << "Used for error messages";
+ cerr << "Used for error messages";
}
/////////
@@ -315,14 +315,14 @@ void Dog::print() const void Dog::~Dog()
{
- cout << "Goodbye " << name << "\n";
+ std::cout << "Goodbye " << name << "\n";
}
int main() {
Dog myDog; // 此时显示“A dog has been constructed”
myDog.setName("Barkley");
myDog.setWeight(10);
- myDog.printDog(); // 显示“Dog is Barkley and weighs 10 kg”
+ myDog.print(); // 显示“Dog is Barkley and weighs 10 kg”
return 0;
} // 显示“Goodbye Barkley”
|