1. Users of Microsoft C++ Version 7.00 for IBM PCs and compatibles: a) Many of the programs on this disk will crash at execution time with the following error message: run-time error R600 - stack overflow The reason is that the default size of the run-time stack is smaller than with other C++ systems. If this happens, run Microsoft's EXEHDR program on your .EXE file: exehdr /S:4000 myprog.exe where S must be an uppercase letter. (Note: Ignore the error message that results from running EXEHDR.) Then run your program again. b) Appendix C describes how to open a file for input by using the ifstream type: ifstream inFile("somefile.dat"); if ( !inFile ) { PrintErrorMsg(); exit(1); } The if statement checks to see if the file was opened successfully (i.e., if the file already exists). In Microsoft C++, the above declaration of inFile will not cause the stream state to fail if the file doesn't exist. You must include a second parameter: ifstream inFile("somefile.dat", ios::nocreate); (Don't worry about what ios::nocreate means.) With this declaration, the stream state will (correctly) indicate failure if the input file doesn't already exist. 2. The Programming Projects in Chapter 4 use the CharList, CharStack, CharQueue, and CharSet classes. These classes are exported by the following modules on this disk: CList (i.e., CLIST.H and CLIST.CPP), CStack, CQueue, and CSet. If your instructor has not already compiled these modules into object code files such as CLIST.OBJ, CSTACK.OBJ, CQUEUE.OBJ, and CSET.OBJ, proceed as follows. Compile (but do not link) each module you wish to use. If you want to use the CStack module, compile (but do not link) it with a command similar to cc -c cstack.cpp The object code will be deposited into a file CSTACK.OBJ or CSTACK.O or something similar. Then, make sure your driver program contains the line #include "cstack.h" and use a command similar to cc myprog.cpp cstack.obj to compile the driver and link it with CSTACK.OBJ. Notice that you only need to examine CSTACK.H to see how to use the CharStack class. You do not need to examine the implementation file CSTACK.CPP. In fact, you should postpone examining the implementation files for these classes until you have read through Chapter 9 of the textbook, at which time the code will make more sense to you. 3. List of files and corresponding textbook chapters, arranged by file name: File Chapter File Chapter File Chapter ------------------- ------------------- ------------------- ARGECHO.CPP 7 FOUNTPEN.CPP 11 QSORT1.CPP 12 BINSRCH.CPP 12 FOUNTPEN.H 11 QSORT1.H 12 BINSRCH.H 12 FRACTION.CPP 3 QSORT2.CPP 12 BINSRCH2.CPP 12 FRACTION.H 3 QSORT2.H 12 BINSRCH2.H 12 GENLIST.CPP 11 RAND.CPP 2 BOOL.H Many GENLIST.H 11 RAND.H 2 BQUEUE.CPP 9 HEAPSORT.CPP 13 RAND2.CPP 3 BQUEUE.H 9 HEAPSORT.H 13 RAND2.H 3 BSTACK.CPP 9 INTLIST.CPP 11 READ.ME - BSTACK.H 9 INTLIST.H 11 ROLLDIC2.CPP 3 BUBSORT2.CPP 12 INTTREE.CPP 13 ROLLDICE.CPP 2 BUBSORT2.H 12 INTTREE.H 13 ROMAN.CPP 1 CHANGE.CPP Appendix LINSRCH.CPP 12 SELSORT.CPP 1 CHARTRE2.CPP 13 LINSRCH.H 12 SLCTSORT.CPP 12 CHARTRE2.H 13 MEMMGR.CPP 10 SLCTSORT.H 12 CHARTREE.CPP 13 NAMEDSTK.CPP 11 SUPPLY.CPP 11 CHARTREE.H 13 NAMEDSTK.H 11 SUPPLY.H 11 CLIST.CPP 4 NEWFRAC.CPP 7 TESTANCS.CPP 6 CLIST.H 4 NEWFRAC.H 7 TESTDEAL.CPP 3 COPYFILE.CPP Appendix PARKSIM.CPP 10 TESTFRAC.CPP 3 CQUEUE.CPP 4 PASSWORD.CPP 2 TESTNEWF.CPP 7 CQUEUE.H 4 PASSWORD.H 2 TESTPASS.CPP 2 CSET.CPP 4 PBXCALLS.CPP 5 TESTPBX.CPP 5 CSET.H 4 PBXCALLS.H 5 TESTSUPP.CPP 11 CSTACK.CPP 4 PBXCALLT.CPP 5 TESTTREE.CPP 13 CSTACK.H 4 PBXCALLT.H 5 TESTVEC.CPP 7 DEALER.CPP 3 PEN.CPP 11 THEATER.CPP 4 DEALER.H 3 PEN.H 11 TRAVERSE.CPP 13 DIGSET.CPP 9 PERSON.CPP 8 TREESORT.H 13 DIGSET.H 9 PERSON.H 8 TREESORT.CPP 13 DYNARRAY.CP 7 PKGLOT.CPP 10 UQUEUE.CPP 9 ECHOCITY.CPP 8 PKGLOT.H 10 UQUEUE.H 9 ECHOFILE.CPP Appendix POWERS.CPP 2 USTACK.CPP 9 ECHOREV.CPP 6 POWERS.H 2 USTACK.H 9 FILEPOS.CPP Appendix POWSOF2.CPP 2 VECTOR.CPP 7 FILTER.CPP Appendix PYTHAG.CPP 12 VECTOR.H 7 FINDCHAR.CPP 4 4. List of files and corresponding textbook chapters, arranged by chapter: File Chapter File Chapter File Chapter ------------------- ------------------- ------------------- READ.ME - ARGECHO.CPP 7 BINSRCH.CPP 12 BOOL.H Many DYNARRAY.CP 7 BINSRCH.H 12 NEWFRAC.CPP 7 BINSRCH2.CPP 12 ROMAN.CPP 1 NEWFRAC.H 7 BINSRCH2.H 12 SELSORT.CPP 1 TESTNEWF.CPP 7 BUBSORT2.CPP 12 TESTVEC.CPP 7 BUBSORT2.H 12 PASSWORD.CPP 2 VECTOR.CPP 7 LINSRCH.CPP 12 PASSWORD.H 2 VECTOR.H 7 LINSRCH.H 12 POWERS.CPP 2 PYTHAG.CPP 12 POWERS.H 2 ECHOCITY.CPP 8 QSORT1.CPP 12 POWSOF2.CPP 2 PERSON.CPP 8 QSORT1.H 12 RAND.CPP 2 PERSON.H 8 QSORT2.CPP 12 RAND.H 2 QSORT2.H 12 ROLLDICE.CPP 2 BQUEUE.CPP 9 SLCTSORT.CPP 12 TESTPASS.CPP 2 BQUEUE.H 9 SLCTSORT.H 12 BSTACK.CPP 9 DEALER.CPP 3 BSTACK.H 9 CHARTRE2.CPP 13 DEALER.H 3 DIGSET.CPP 9 CHARTRE2.H 13 FRACTION.CPP 3 DIGSET.H 9 CHARTREE.CPP 13 FRACTION.H 3 UQUEUE.CPP 9 CHARTREE.H 13 RAND2.CPP 3 UQUEUE.H 9 HEAPSORT.CPP 13 RAND2.H 3 USTACK.CPP 9 HEAPSORT.H 13 ROLLDIC2.CPP 3 USTACK.H 9 INTTREE.CPP 13 TESTDEAL.CPP 3 INTTREE.H 13 TESTFRAC.CPP 3 MEMMGR.CPP 10 TESTTREE.CPP 13 PARKSIM.CPP 10 TRAVERSE.CPP 13 CLIST.CPP 4 PKGLOT.CPP 10 TREESORT.CPP 13 CLIST.H 4 PKGLOT.H 10 TREESORT.H 13 CQUEUE.CPP 4 CQUEUE.H 4 FOUNTPEN.CPP 11 CHANGE.CPP Appendix CSET.CPP 4 FOUNTPEN.H 11 COPYFILE.CPP Appendix CSET.H 4 GENLIST.CPP 11 ECHOFILE.CPP Appendix CSTACK.CPP 4 GENLIST.H 11 FILEPOS.CPP Appendix CSTACK.H 4 INTLIST.CPP 11 FILTER.CPP Appendix FINDCHAR.CPP 4 INTLIST.H 11 THEATER.CPP 4 NAMEDSTK.CPP 11 NAMEDSTK.H 11 PBXCALLS.CPP 5 PEN.CPP 11 PBXCALLS.H 5 PEN.H 11 PBXCALLT.CPP 5 SUPPLY.CPP 11 PBXCALLT.H 5 SUPPLY.H 11 TESTPBX.CPP 5 TESTSUPP.CPP 11 ECHOREV.CPP 6 TESTANCS.CPP 6