mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-14 10:45:06 +02:00
Update c++-cn.html.markdown
Line 325: update myDog.printDog() to myDog.print().
This commit is contained in:
@@ -322,7 +322,7 @@ int main() {
|
|||||||
Dog myDog; // 此时显示“A dog has been constructed”
|
Dog myDog; // 此时显示“A dog has been constructed”
|
||||||
myDog.setName("Barkley");
|
myDog.setName("Barkley");
|
||||||
myDog.setWeight(10);
|
myDog.setWeight(10);
|
||||||
myDog.printDog(); // 显示“Dog is Barkley and weighs 10 kg”
|
myDog.print(); // 显示“Dog is Barkley and weighs 10 kg”
|
||||||
return 0;
|
return 0;
|
||||||
} // 显示“Goodbye Barkley”
|
} // 显示“Goodbye Barkley”
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user