You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter12/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,3 +25,7 @@ Define a class `D2` derived from `D1` and override `pvf()` in `D2`. Make an obj
25
25
26
26
## [Drill 7](drill/07)
27
27
Define a class `B2` with a pure virtual function `pvf()`. Define a class `D21` with a `string` data member and a member function that overrides `pvf()`; `D21::pvf()` should output the value of the `string`. Define a class `D22` that is just like `D21` except that its data member is an `int`. Define a function `f()` that takes a `B2&` argument and calls `pvf()` for its argument. Call `f()` with a `D21` and a `D22`.
0 commit comments