Utilities Package (contained in namespace Scobey) Version 2011.0
For use with VS2010
Utilities Package (contained in namespace Scobey) Documentation

This is the Fall, 2011 version of the documentation for the instructor-supplied C++ utilities package to be used in CSCI 2341 and CSCI 2342. You will find here descriptions of some very useful (time-saving) constant definitions, free functions, and classes. It will take some time to become thoroughly familiar with all that is available, but you need to start using the package immediately and learn some new facilities each week as the term progresses.

What's New

Those who are familiar with this utilities package from previous years may (or may not) encounter some differences. The more recent changes and additions are listed below.

  1. The DisplayIDInfo() free function has been renamed DisplayOpeningScreen(), but retains essentially the same functionality. This function is also now an inline function, which helps to avoid multiply-defined function name compile-time errors when utilities.h is included in several different source files of the same program. The two named constants which provide values for the default parameters of the DisplayOpeningScreen() function have also been renamed: DEFAULT_DESCRIPTION is now called DEFAULT_PROGRAM_INFO, and DEFAULT_ID_INFO is now called DEFAULT_PROGRAMMER_INFO.
  2. There is a new ClearScreen() function that clears the screen and positions the cursor to write at the bottom left corner of the screen. This a portable function that works simply by writing blank lines to the screen.
  3. The ReadLine() free function has been replaced by two very similar free functions, the ReadNextLine() function and the ReadThisLine() function. The ReadNextLine() function displays a prompt and moves the cursor to the next line for the user to enter as much as a full line of text, while the ReadThisLine() function displays a prompt and keeps the cursor on the same line as that prompt so that the user can enter (a presumably shorter piece of) text on the same line as the prompt. Note that the ReadNextLine() function has exactly the same functionality as the previous ReadLine() function. In both cases all text entered, except the terminating newline character, is read into the string variable receiving the input.
  4. There are three new constant arrays containing names: one containing 300 first names for females, one containing 300 first names for males, and one containing 100 family names, all ranked in the order of name frequency as observed in the United States and reported on the Internet at these sites:
    www.census.gov/genealogy/names/dist.female.first
    names.mongabay.com/male_names_alpha.htm
    en.wikipedia.org/wiki/List_of_most_common_surnames
 All Classes Namespaces Files Functions Variables Typedefs