nt cnt_house); save_flat (void ** start, FILE * f, int cnt_flat); save_peopleslist (void ** start, FILE * f, int cnt_people); loadlist (char * filename, void ** amp; start); load_street ( void ** amp; start, FILE * f, int cnt_street); load_house (void ** amp; start, FILE * f, int cnt_house); load_flat (void ** amp; start, FILE * F, int cnt_flat); load_peoplelist (void ** amp; start, FILE * f, int cnt_people);
//кінець
# endif//PROTOTYPEFUNC_H
ТЕКСТ ФАЙЛА FUNCTIONS.CPP
# include types.h
# include lt; QString gt;
# include qstring.h
# include prototypefunc.h
# include lt; iostream gt; namespace std; cmppeople (void * p, QString key) {(((people *) p) - gt; name == key) {0;
} (((people *) p) - gt; name gt; key) {1;
} (((people *) p) - gt; name lt; key) {- 1;
} cmpflat (void * p, QString key) {(((flat *) p) - gt; number == key) {0;
} (((flat *) p) - gt; number gt; key) {1;
} (((flat *) p) - gt; number lt; key) {- 1;
} cmphouse (void * p, QString key) {(((house *) p) - gt; number == key) {0;
} (((house *) p) - gt; number gt; key) {1;
} (((house *) p) - gt; number lt; key) {- 1;
} cmpstreet (void * p, QString key) {(((street *) p) - gt; name == key) {0;
} (((street *) p) - gt; name gt; key) {1;
} (((street *) p) - gt; name lt; key) {- 1;
} cmpray (void * p, QString key) {(((Rayon *) p) - gt; name == key) {0;
} (((Rayon *) p) - gt; name gt; key) {1;
} (((Rayon *) p) - gt; name lt; key) {- 1;
} ** initarray () {** p=new void * [SIZE_AR_FIRST + 2];
p=p + 2;
((int *) p) [POS_CNT]=0;
((int *) p) [POS_SZ]=SIZE_AR_FIRST; p;
} extend (void ** amp; start) {size=((int *) start) [POS_SZ]; cnt=((int *) start) [POS_CNT];=size + DELTA; ** p=new void * [size];
((int *) p) [POS_SZ]=size;
((int *) p) [POS_CNT]=cnt;
for (int i=0; i lt; (size-DELTA); i ++) {[i]=start [i];
}=p;
} findel (void ** start, QString key, int amp; findpos, int amp; findok, cmp func) {hi, low, middl; resultcmp;=0; (((int *) start) [POS_CNT] == 0) {= 0 ;;
}=0;=((int *) start) [POS_CNT] - 1; (low lt;=hi) {= (hi + low)/2;=func (start [middl], key); (resultcmp == 0) {= middl;=1 ;;
} (resultcmp == 1) {= middl - 1;
} else {= middl + 1;
}=low;
} removeel (void ** amp; start, int amp; posdel) {cnt=((int *) start) [POS_CNT]; * wp=start [posdel]; (int i=posdel ; i lt; cnt; i ++) {[i]=start [i + 1];
} (wp); -;
((int *) start) [POS_CNT]=cnt;
} clearpeople (void ** amp; start) {cnt=((int *) start) [POS_CNT]; p=0; (int i=0; i lt; cnt; i ++) {( start, p);
} removeflat (void ** amp; start, int pos) {(((flat *) start [pos]) - gt; sublev); (start, pos);
} clearflat (void ** amp; start) {cnt=((int *) start) [POS_CNT]; p=0; (int i=0; i lt; cnt; i ++) {( start, p);
} removehouse (void ** amp; start, int pos) {(((house *) start [pos]) - gt; sublev); (start, pos);
} clearhouses (void ** amp; start) {cnt=((int *) start) [POS_CNT]; p=0; (int i=0; i lt; cnt; i ++) {( start, p);
} removestreet (void ** amp; start, int pos) {(((street *) start [pos]) - gt; sublev); (start, pos);
} clearstreets (void ** amp; start) {cnt=((int *) start) [POS_CNT]; p=0; (int i=0; i lt; cnt; i ++) {( start, p);
} removerayon (void ** amp; start, int pos) {(((Rayon *) start [pos]) - gt; sublev); (start, pos);
} clearlist (void ** amp; start) {cnt=((int *) start) [POS_CNT]; p=0; (int i=0; i lt; cnt; i ++) {( start, p);
} push_order (void ** amp; start, void * data, int amp; pos) {cnt=((int *) start) [POS_CNT]; sz=((int *) start) [POS_SZ]; (cnt == sz) {(start);
} (pos == cnt) {[pos]=data;
} else {(int i=cnt - 1; i gt;=pos; i -) {[i + 1]=start [i];
} [pos]=data;
}
((int *) sta...