************************* MASTER CODE *************************************** The name of the first file in this disk's directory identifies the volume, issue number and revision of the disk. The format of this filename is: !CDmvvii.rrr where ! = the '!' character m = C for C Users Journal, W for Windows/DOS Developer's Journal vv = volume ii = issue rrr = revision (001 for initial release, 002 for next update, etc.) The file UPDATE.DOC contains information about any additions or corrections to material on the disk since the original magazine publication. If you have obtained this code from a floppy diskette or from CompuServe, the headings under the column "FILENAME" represent the names of .ZIP files. All files listed under the filename are archived in the .ZIP file. If you have obtained this code from UUNET, the headings under the column "FILENAME" represent the names of subdirectories. All files listed under the "filename" are included in a subdirectory of that name. Keywords: Mar95 C C+ Filter Octree Genetic sstream Quicksort CD The code listings for the March 1995 issue of C/C++ Users Journal include source code for Bob Stout's article on "Olympic" filtering for noisy data, Blase Cindric's article on a special insertion sort algorithm, Ian Ashdown's article on octree color quantization, and Keith Grant's article on genetic algorithms. Also included are listings from P.J. Plauger's Standard C/C++ column, Chuck Allison's column, Code Capsules, and Dan Saks' column, Stepping Up to C++. ************************* FILE DESCRIPTION ********************************** The following files are included in the disk: FILENAME AUTHOR-NAME TITLE PAGE (Zip archive/ subdirectory name) ------------------------------------------------------------------------------- plauger P.J. Plauger Standard C/C++: The Header 10 sstream - listing 1, The header stringbu.c - listing 2, stringbug basic members strbstr0.c - listing 3, Defines stringbuf::str strbstr1.c - listing 4, Defines stringbug::str(const string&) istrings.c - listing 5, istringstream basic members ostrings.c - listing 6, ostringstream basis members tsstream.c - listing 7, Test program for stout Bob Stout Olympic Filtering for Noisy 22 Data circbuf.h - listing 1, Header file for circular buffer C functions circbuf.c - listing 2, Circular buffer C functions circbuf.hpp - not listed, A template-based circular buffer class implemented in C++ olymfilt.hpp - not listed, An olympic filter derived from the circular buffer class (C++) avgfilt.hpp - not listed, A straight average filter for comparison, derived from the circular-buffer class (C++) filtdemo.cpp - not listed, A demo program in C++ cindric Blase When the "Best" Algorithm Isn't 27 B. Cindric inssort.c - listing 1, Special insertion sort routine ashdown Ian Ashdown Octree Color Quantization 31 general.h - listing 1, General definitions and datatypes oct_quan.h - listing 2, Octree color quantization class header oct_quan.cpp - listing 3, Octree color quantization class bmp_quan.h - not listed, MS-Windows color quantization class header bmp_quan.cpp - not listed, MS-Windows color quantization class dib_dos.h - not listed, MS-Windows DIB structures for MS-DOS grant Keith Grant Introduction to Genetic 45 Algorithms demo.cpp - listing 1, Demo program and global functions to solve knapsack problem chrom.h - listing 2, Definition of class CGAChromosome and short member functions chrom.cpp - listing 3, More member functions of class CGAChromosome pop.h - listing 4, Definition of class CGAPopulation and short member functions pop.cpp - listing 5, More member functions of class CGAPopulation random.h - listing 6, Header file for probability functions random.cpp - listing 7 Probability functions genetic.def - not listed, module definition file for Windows demo program allison Chuck Allison Code Capsules: The Standard C 59 Library, Part 3 rounderr.c - listing 1, Shows roundoff error in computing powers of e root.c - listing 2, Illustrates use of machine epsilon in a root-finding algorithm machine.c - listing 3, Computes machine floating-point parameters mathdemo.c - listing 4, Illustrates several functions calc.c - listing 5, A simple calculator that illustrates some functions lconv.h - listing 6, The members of struct lconv tlocale.c - listing 7, Shows the effect of locale settings on the decimal point character and time formatting ignore.c - listing 8, Shows how to register a signal max.c - listing 9, Uses the macros to search a variable-length list of integers saks Dan Saks Stepping Up to C++: More Minor 79 Enhancements to C++ as of CD Registration dyncast.cpp - listing 1, Using the dynamic_cast operator nesthide.hpp - listing 2, A nested class name hidden by a data member name longname.cpp - listing 3, Dealing with long type names using typedefs longnam2.cpp - listing 4, A variation on the example in listing 3 decouple.cpp - listing 5, Decoupling the class hierarchy structure from application code using a member typedef maxlen.cpp - listing 6, A maxlen function intended for both arrays of constant strings and arrays of non- constant strings letters We Have Mail 102 rewind.h - listing 1, A rewind manipulator for istream heap.h - listing 2, Allocating global memory from Windows fixmilam.c - listing 3, Code to correct Milam's date routines gregor.c - listing 4, Calculating Gregorian Easter julian.c - listing 5, Calculating Julian Easter ******************************************************************************* If you have questions regarding to the disk, please call or write us. ----------------------------------------------------------------------------- R&D Publications, Inc. 1601 W. 23rd St. Suite 200 Lawrence, KS 66046 (913) 841-1631 -----------------------------------------------------------------------------