12345
class line_t { public: double x1,y1,x2,y2; int segment; };
12
line_t line1; cin>>line1;
operator>>
istream& operator>>( istream& is, line_t& rLT) { is >> rLT.x1 >> rLT.y1 >> rLT.x2 >> rLT.y2 >> rLT.segment; return is; }
1234
line_t::line_t(istream& is) { is >> x1 >> y1 >> x2 >> y2 >> segment; }
line_t line1(cin);
ifstream ifs; ifs>>Line;
ifstream& operator>>( ifstream& is, line_t& rLT) { ifs >> rLT.x1 >> rLT.y1 >> rLT.x2 >> rLT.y2 >> rLT.segment; return is; }