home *** CD-ROM | disk | FTP | other *** search
- ===========================================================================
- IBM Confidential
-
- (C) Copyright IBM Corp. 1995. All Rights Reserved.
- US Government Users Restricted Rights - Use, duplication or disclosure
- restricted by GSA ADP Schedule Contract with IBM Corp.
- ===========================================================================
-
- **********************************************************************
- * DISCLAIMER OF WARRANTIES: *
- * *
- * The following enclosed code is sample code created by IBM *
- * Corporation. This sample code is not part of any standard IBM *
- * product and is provided to you solely for the purpose of assisting *
- * you in the development of your applications. The code is provided *
- * "AS IS", without warranty of any kind. IBM shall not be liable *
- * for any damages arising out of your use of the sample code, even *
- * if they have been advised of the possibility of such damages *
- * *
- **********************************************************************
-
- SAMPLE NAME: SAMPLE06 - Authors
-
- DESCRIPTION:
-
- The authors samples are two implementations of an application that
- stores authors names and book titles into a container and then
- prints the contents of the container.
-
- The container (an n-ary tree) and data (the TreeData class) are defined
- separately, and then the data is introduced into the container. There
- are two ways to accomplish this:
-
- 1- The TreeData class is 'joined' in the Tree classes by the DataInTree
- class. DataInTree is derived from TreeNode, and has a data member that
- is a TreeData object.
-
- 2- Define an n-ary tree of TreeData. This is done using templates.
-
- Authors1 uses method 1 and Authors2 uses method 2.
-
- TASK:
-
- Store or print authors' names and books titles.
-
- CONCEPT/FEATURE:
-
- Shows building two identical data manipulation applications, one
- that uses basic C++ class and one that uses the C++ template
- mechanism.
-
- HOW TO RUN THE SAMPLE FROM THE COMMAND LINE:
-
- To build and run the Authors1 sample, enter the following:
-
- cd X:\ibmcppw\samples\compiler\author\authors1
- nmake
- authors1
-
- where X: is the drive you installed the samples component of
- VisualAge for C++.
-
- To build and run the Authors2 sample, enter the following:
-
- cd X:\ibmcppw\samples\compiler\author\authors2
- nmake
- authors2
-
- where X: is the drive you installed the samples component of
- VisualAge for C++.
-
- HOW TO RUN THE SAMPLE FROM WITHIN THE WorkFrame ENVIRONMENT:
-
- To build the sample, click the "Build normal" button on the project's
- toolbar or from the Project pulldown, select "Build normal"
-
- To execute the sample, click the "Run" button on the project's toolbar.
-
- ADDITIONAL INFORMATION
-
- For additional information on this and other samples shipped
- with the VisualAge for C++ product, please see the Guide to Samples
- notebook.
-
- To access the notebook from Program Manager, open the
- VisualAge for C++ product object, then open the Guide to Samples
- notebook.
-
-