+ 1

It's about the classes in c++

Can anyone tell what is the difference between public and private class in c++because I am facing problem while I am doing coding and give some easy and logical example please

22nd May 2022, 2:13 PM
Sunilsingh Nagarkoti
2 Answers
+ 1
Public means accessible to any other class, hence the word public. Private means no other class can access it's methods or attributes, even it's children. It should've been said in your course, make sure not to skim what is being said.
22nd May 2022, 2:53 PM
Justice
Justice - avatar
+ 1
Thnx alot
23rd May 2022, 2:49 AM
Sunilsingh Nagarkoti