There is a code:
class _class { private: int val; public: _class() { val = 0; } _class(int i) { val = i; } int get(_class &ob) { return ob.val; // почему свойство val доступно? "ob" же это объект // и свойство "val" у него private ^_^ } }; int main(int argc, char *argv[]) { _class ob, ob1(10); cout << ob.get(ob1) << endl; return 0; } The same will happen if I stupidly create an object of class "_class" in the "get" method and try to get the variable "val", then I will get it without any problems. I do not understand something?