if using friend function and class we can access private data then how to avoid it ?
-
i know using friend function and friend class we can access private data
then how to make this type of keyword to not access the private data for security purpose ?
-
@Christian-Ehrlicher means there is no other way to avoid it.
to avoid this i have to not use this friend keyword.
@Qt-embedded-developer
If you want to access private data you usefriend
.
If you do not usefriend
you cannot access private data.
What is the question? No, you cannot access private data and yet not usefriend
, else what else would it be for? If there was a different keyword which did this we would say so... -
i know using friend function and friend class we can access private data
then how to make this type of keyword to not access the private data for security purpose ?
You describe the function of this keyword and use it but don't want it's functionality... So don't use it.
-
You describe the function of this keyword and use it but don't want it's functionality... So don't use it.
@Christian-Ehrlicher means there is no other way to avoid it.
to avoid this i have to not use this friend keyword.
-
@Christian-Ehrlicher means there is no other way to avoid it.
to avoid this i have to not use this friend keyword.
@Qt-embedded-developer
If you want to access private data you usefriend
.
If you do not usefriend
you cannot access private data.
What is the question? No, you cannot access private data and yet not usefriend
, else what else would it be for? If there was a different keyword which did this we would say so... -