/*************************************** ** Implementation for functions on the ** the struct Committee ***************************************/ #include "Committee.h" void read(Committee &C, istream &IN) { // Read the committee name char c; do { c = IN.get(); } while (c == ' ' || c == '\t' || c == '\n'); string s = ""; do { s += c; c = IN.get(); } while(c != '\n'); C.name = s; // Read chair read(C.chair,IN); // Read rest of committee for(int i = 0; i < 4; i++) read(C.mems[i],IN); } void write(Committee C, ostream &OUT) { OUT << C.name << endl; write(C.chair,OUT); OUT<< endl; for(int i = 0; i < 4; i++) { write(C.mems[i],OUT); OUT << endl; } }