/* teststruct2.cpp CIS 150 David Klick 6/30/05 Using an array of structures. */ #include #include #include using std::cout; using std::cin; using std::setw; using std::setprecision; using std::showpoint; using std::fixed; struct Employee { int id; char fname[15]; char lname[15]; double rate; }; const int ARRAY_SIZE = 5; void display(Employee e); int main(void) { int i; // declare array of Employees Employee emp[ARRAY_SIZE]; // get Employee info from user for (i=0; i> emp[i].id; cin.ignore(); // get rid of newline after id cout << "First name: "; cin.getline(emp[i].fname, 15, '\n'); cout << " Last name: "; cin.getline(emp[i].lname, 15, '\n'); cout << " Rate: "; cin >> emp[i].rate; cout << '\n'; } // display employee info for (i=0; i