This assignment is due Tuesday, September 9, by the start of class.
Write a program that does the following:
You may also assume that a ``word'' is a contiguous group of non-white
space characters. This sounds complicated, but is really not. For
example, in the previous sentence, not. would be a word, as would
"word" in the sentence before that--note the inclusion of the
period and the quotation marks.
<, >, etc.) that you use
with numbers.
Place the work for this assignment in your personal I:\CSC122
folder in a folder called HW1. See below for how to create a
project from scratch - call the project hw1.ide. Turn in a
printout of this assignment on the due date in class. There is a file
called sample.txt in the public\Thede folder that you can
use to test your program.
There are a number of topics that will be useful for the assignment:
fstream variables, etc.
File menu, choose Project... out of the
New submenu. The ``New Target'' dialog box will appear. Enter
the correct project path and name in the first text box; for this
assignment, you would enter I:\CSC122\YourName\HW1\hw1.ide. Make
sure that ``Application [.exe]'' is selected under ``Target Type,'' and
that the ``Platform'' and ``Target Model'' are ``Win32'' and ``Console''
(it will probably default to ``GUI,'' so you will need to be sure this
gets changed). Now click the ``Advanced'' button and uncheck the boxes
labeled .rc and .def, then click ``OK'' twice to make each
dialog go away. Finally, double-click the .cpp node in the
project window that appears and you will get an editor window where you
can start entering your program.
To attach additional source files to a project, choose
File/New/TextEdit and then File/Save as... from the menu.
Give your file an appropriate name in the ``Save File'' dialog and click
``OK.'' Now, in the project window, right-click on the .exe node
(at the top) and choose ``Add node'' from the context menu. This will
bring up a file chooser; select the new file you just created and click
``OK.'' The next time you build the project, this new file will be
compiled in with the rest of the program.