/* - in a file you can find info about app. the name of the person who is selling the app. (one Family name and any nr. of Firstname;) then the area: Pest or Buda; the area - how many sqm; - and price/ sqm; - write in an output file the name, sqm and price/ sqm of those which are located in Buda and are bigger then 80 sqm */ #include #include #include #include #include #include using namespace std; enum area {Buda, Pest}; struct appart{ string Fam_name; vector First_n; area where; int sqrtm; int sqrt_price; }; enum status{is_false, is_true }; bool read(status & it_is, appart & app, ifstream &x); void write(ofstream &y, appart & app_2); int main() { string fname; cout << " - the name of the inp. file: "; cin >> fname; ifstream x(fname.c_str()); if(x.fail()) { cerr << " - there is no such input file! "<=80) { write(y,app); } } l=read(it_is,app,x); } x.close(); y.close(); return 0; } bool read(status & it_is, appart & app, ifstream &x) { string line; getline(x, line); if (!x.fail()) { it_is=is_true; stringstream inf(line); vector h; string tmp; inf>>tmp; while(!inf.fail()){ h.push_back(tmp); inf>>tmp; } int n=h.size(); // n data in a row cout<<" - the data in the row are: "<