//read from file - any type of imput data /* if you have too many different type of data, then you should declare a structure in order not to make the decl. of the function too long;*/ #include #include #include #include #include #include "stdlib.h" using namespace std; void read(vector &, vector & ); int main() { vector name; vector data; read(name, data); cout<<" back from read.names.." <& name, vector& data) { ifstream f; bool err; string filename; do{ cout << " - what is your file name:"; cin >> filename; f.open( filename.c_str() ); err=f.fail(); if (err){ cout << " - there is no such file! " << endl; f.clear(); } }while (err); name.clear(); data.clear(); string sname; float tdata; string sor; getline(f,sor); while(!f.fail()) { istringstream ss(sor); getline(ss, sname, ';'); //cout<>tdata; // cout<