Typo in slide "Private" in Encapsulation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Typo in slide "Private" in Encapsulation

in the main function, myClass should be MyClass, as it is a datatype declaration.

27th May 2017, 7:02 PM
Tre
Tre - avatar
2 Answers
+ 4
While pascal case is a common style for class declarations, you're free to use any convention you wish; it's not enforced by the C++ standard. Whatever you choose, you should strive to use it consistently throughout the code base. Seeing as they keep it as "myClass" throughout the lesson, I don't believe that this is a typo. However, they do switch to "MyClass" in the questions, which could be confusing.
27th May 2017, 7:57 PM
Squidy
Squidy - avatar
0
right. it's defined as MyClass and then used as myClass.
27th May 2017, 7:59 PM
Tre
Tre - avatar