摘要: View Code #include<iostream>using namespace std;struct pos { int x ,y ; pos() {}; pos(int X,int Y) :x(X) , y(Y) {} pos operator + (pos & a) { //重载 + 号,可以直接相加 return pos(a.x + x,a.y + y); } void print() { cout << x << " " << y <<endl; }};template <typena 阅读全文
posted @ 2013-03-19 17:41 gray035 阅读(156) 评论(0) 推荐(0) 编辑