Skip to content

Commit

Permalink
Merge pull request #22 from josephharrington/patch-1
Browse files Browse the repository at this point in the history
Fix virtual destructor name
  • Loading branch information
Joe Gibson authored Dec 14, 2020
2 parents 94b1b22 + 6fe4436 commit 00a38ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions C++ Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Virtual methods are employed as follows:
class Shape {
public:
// Virtual destructor (VERY IMPORTANT, SEE NOTE BELOW)
virtual ~Area() {}
virtual ~Shape() {}
// Virtual area method
virtual double Area() const {
Expand Down Expand Up @@ -393,7 +393,7 @@ In some cases, you may want to **enforce** that sub-classes implement this metho
```c++
class Shape {
public:
virtual ~Area() {}
virtual ~Shape() {}
virtual double Area() const = 0;
};
```
Expand Down

0 comments on commit 00a38ff

Please sign in to comment.