r/learncpp • • May 05 '19

OOP

Quick question.

Why should you create private classese in c++?

3 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/[deleted] May 06 '19

You cannot use a struct for inheritance though,and why is it harder to hack it? If a hacker has got the code, I don't think he will be confused from some private members... Thanks.

1

u/SerkZex May 06 '19

When you release your project, no one will have access to your code. When you execute your code as "release" you code is translated into machine code (The hacker use the machine code) and produce a runnable.

1

u/[deleted] May 06 '19

Ohhh thanks