//File index.cpp #include "index.h" #include "bstree.h" #include const MAX=13; char* indexWriter::truncword(char* s) { char s1[MAX]; strncpy(s1,s,MAX-1); s1[MAX-1]='\0'; strcpy(s,s1); return s; }; indexWriter::indexWriter():t() {}; void indexWriter::entry(char* w1, int page) { char w2[80]; strcpy(w2,truncword(w1)); information item(w2,page); t.insert(item); }; void indexWriter::report() { t.traverse(INORDER); };