vendredi 1 juillet 2016

C++ how to access a private function from a public function?

I have a class with several public functions and in it I have a function that performs linear_search on an array.

The linear_search function is called by several other public functions.

If i try to set linear_search to private, then all my public functions that call it will give an error.

How can I hide my linear_search function from a user and still be able to call it within public functions?

All these functions are in the same class.

Aucun commentaire:

Enregistrer un commentaire