hello.cpp
: hello, world
ave.cpp
: print the average of a list of
integers ave1000.cpp
: same, but
using arrays; build with g++ -std=c++11 ave1000.cpp
occurrences.cpp
: count number of
times a character appears input. If build to a.exe, then
a.exe < occurrences.cppcounts 17 semicolons, and
a.exe _ < occurrences.cppcounts 5 underscores.
print-args.cpp
: print
all command-line arguments (showing how to access them)
increasing-numbers.cpp
:
illustrates writing an eof-controlled loop with limits
distinct1000.cpp
: count number
of distinct values in the input.
countvowels.cpp
: count the
number of vowels; illustrating reading input by characters (and including
code to read from a file as well as standard input).
todo.cpp
: simple todo list using
fixed-size arrays and strings.
ave.h
,
ave.cpp
,
printave.cpp
: illustrating
separate compilation and reference parameters
simple_vector.h
: Simple vector code
alg-examp.cpp
: illustrate
algorithm code
list_iterator.cpp
: illustrates
iterating over a list
better_ave.cpp
: illustrates
reading and writing from streams (rather than cin
and cout
) and using stringstreams with assert to test.