Ask Question

All members within a class are by default

+1
Answers (1)
  1. 25 August, 19:37
    0
    All the members within a class are by default are private. Private function in a class can access public function within a similar class. Private member formed the implementation of the class and also form the private interface of members within the class.

    All the member of class can be access by function inside the class when it is declare as private.

    For example:

    class test

    { private:

    int a; / / when test:a is private

    public:

    test () : a () / / a is accessible in test class

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “All members within a class are by default ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers