0% found this document useful (0 votes)
11 views

Explore 14

The document outlines a programming challenge that involves creating a program to read words and count the frequency of each unique word. It emphasizes the importance of understanding file I/O and encourages writing pseudo-code before diving into C++ code. The task is designed to reinforce the concepts learned in C++ while keeping the implementation straightforward.

Uploaded by

563306301
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Explore 14

The document outlines a programming challenge that involves creating a program to read words and count the frequency of each unique word. It emphasizes the importance of understanding file I/O and encourages writing pseudo-code before diving into C++ code. The task is designed to reinforce the concepts learned in C++ while keeping the implementation straightforward.

Uploaded by

563306301
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Exploration 14

The Map Data Structure

Now that you understand the basics, it's time to move on to more exciting
challenges.
Let's write a real program--something non-trivial, but still simple enough to
master
this early in the book. Your task is to write a program that reads words and counts
the frequency of each unique word. For the sake of simplicity, a word is a string
of
non-space characters separated by whitespace. Be aware, however, that by this
definition, words end up including punctuation characters, but we'll worry about
fixing that problem later.

This is a complicated program, touching on everything you've learned about C++ so


far.
If you want to exercise your new understanding of file I/O, read from a named file.
If
you prefer the simplicity, read from the standard input. Before jumping in and
trying
to write a program, take a moment to think about the problem and the tools you need
to
solve it. Write pseudo-code for the program. Try to write C++ code where you can,
and
make up whatever else you need to tackle the problem. Keep it simple: and don't
dwell
on trying to get syntax details correct.

You might also like