2009-02-15から1日間の記事一覧
今度は>>演算子。 独自クラスで入力を受け付けるプログラムは次の通り。 #include <iostream> using namespace std; class Vector { private: int x,y; public: void show() { cout << x << "," << y << endl; } friend istream &operator>>(istream &stream, Vector &</iostream>…