Skip to content

Commit 029016f

Browse files
committed
Merge pull request isocpp#94 from jullej/master
Fixed typos in chapter C.127
2 parents f1981f9 + 5a4e719 commit 029016f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4781,13 +4781,13 @@ not using this (over)general interface in favor of a particular interface found
47814781
// ... no destructor ...
47824782
};
47834783

4784-
stuct D : B { // bad: class with a resource derived from a class without a virtual destructor
4784+
struct D : B { // bad: class with a resource derived from a class without a virtual destructor
47854785
string s {"default"};
47864786
};
47874787

47884788
void use()
47894789
{
4790-
B* p = new B;
4790+
B* p = new D;
47914791
delete p; // leak the string
47924792
}
47934793

0 commit comments

Comments
 (0)