摘要: #include #include #include using namespace std; void pri(vectora) //用输出迭代器将容器中元素输出到标准输出流 { ostream_iterator int_put(cout," "); for(auto it : a) //范围for语句 { *int_pu... 阅读全文
posted @ 2016-07-29 19:19 真!白 阅读(261) 评论(0) 推荐(0)
摘要: #include using namespace std; class A{ public: A(int x_):x(x_){}; A/*&*/ operator =(A& h)/*&*/; //加上后置&就不合法,默认情况他同时支持向左值(&)和右值(&&)赋值 friend ostream& operator << (ostream& out,cons... 阅读全文
posted @ 2016-07-29 16:36 真!白 阅读(235) 评论(0) 推荐(0)