
此为学习c++,笔记。
#include
#include
using namespace std;
#include
#include
class Person
{
friend ostream &operator<<(ostream &cout,Person &p);
public:
Person(int a,int b)
{
m_a=a;
m_b=b;
}
private:
int m_a;
int m_b;
};
ostream &operator<<(ostream &cout,Person &p)
{
cout<
}
void test01()
{
Person p(10,10);
//p.m_a=10;
// p.m_b=10;
cout< }
int main()
{
test01();
system("pause");
return 0;
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)