1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #if(0)
- #include <iostream>
- class Person
- {
- public:
- Person(int a , int b)
- {
- m_A = a;
- m_B = b;
- }
- friend std::ostream& operator<<(std::ostream& cout, Person& p);
-
-
-
-
-
- private:
- int m_A;
- int m_B;
- };
- std::ostream& operator<<(std::ostream &cout , Person &p)
- {
- std::cout << "m_A = " << p.m_A << " m_B = " << p.m_B;
- return cout;
- }
- void test01()
- {
- Person p(10,10);
-
-
- std::cout << p << std::endl;
- }
- int main()
- {
- test01();
- system("pause");
- return 0;
- }
- #endif
|