federico-busato / Modern-CPP-Programming

Modern C++ Programming Course (C++03/11/14/17/20/23/26)
https://federico-busato.github.io/Modern-CPP-Programming/
11.91k stars 798 forks source link

Fixes in 08.Object_Oriented_I.pdf #99

Closed leofracca closed 5 months ago

leofracca commented 5 months ago

Hi Federico,

I think that on page 5, the definition of struct should state that we are talking about a C structure, not a C++ one. Indeed, the comparison between struct and class at the end of the page states that they are semantically equivalent (implying "in C++"), which maybe can create a bit of confusion for programmers who never used C++, since from the first two definitions it may look like a struct is "less powerful" than a class. Here is an example of how I would rewrite the slide:

C Structure ...

C++ Structure/Class ...

struct vs. class in C++ ...

Let me know what you think about it.

Moreover, I guess there is a typo in the comments on page 35. The second comment should be (2), not (21). Last minor suggestion: it would probably be better if the verbs have the same form ((2) says initializes, but (1) and the last comment say allocate and call respectively).

federico-busato commented 5 months ago

Hi @leofracca. Thanks for the great feedback. All your comments makes sense. I fixed the typos at page 35. I modified the page 5 in the following way image