struct中構造函數寫法,重載運算符寫法

#include<iostream> using namespace std; struct Point{ int x,y; Point(int x=0,int y =0):x(x),y(y) {} }; ostream& operator << (ostream &out, const Point A){ out << A.x << ' ' << A.y<<endl; return o
相關文章
相關標籤/搜索