A friend function named spacefriend, which is a friend of class space, and which takes the class object as an argument and prints the value of its variable x.
名为spacefriend的友元函数,它是space类的友元,它的参数是类对象,输出类对象的x变量的值。
A main function calls the public function func with int arguments of class space.
main函数,它调用space类中使用int参数的公共函数func。
Probe the function func1 of class space.
探查space类的func1函数。
Probe the function func2 of class space.
探查space类的func2函数。
Probe the function func2 of class space.
探查space类的func2函数。
应用推荐