Qustion about private

From: Southp (is91033_at_cis.nctu.edu.tw)
Date: 05/07/04


Date: Fri, 7 May 2004 07:51:39 +0800

Simple test:

class Person{
private:
    int secret;

public:
    void peeping_tom(Person b) {cout<<b.secret;}

};

int main(){
    Person john,bob;
    john.peeping_tom(bob);
}

In MinGW,this is compilable and executable.
I'm wonder is this the nature of C++ or compiler dependence?
John can peep Bob's secret without doubt?