home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / ICLCC / XMULTI1.C < prev    next >
C/C++ Source or Header  |  1993-05-07  |  2KB  |  37 lines

  1. /******************************************************************************/
  2. /*                                                                            */
  3. /* COPYRIGHT:                                                                 */
  4. /* ----------                                                                 */
  5. /* Copyright (C) International Business Machines Corp., 1991,1992.            */
  6. /*                                                                            */
  7. /* DISCLAIMER OF WARRANTIES:                                                  */
  8. /* -------------------------                                                  */
  9. /* The following [enclosed] code is sample code created by IBM                */
  10. /* Corporation.  This sample code is not part of any standard IBM product     */
  11. /* and is provided to you solely for the purpose of assisting you in the      */
  12. /* development of your applications.  The code is provided "AS IS",           */
  13. /* without warranty of any kind.  IBM shall not be liable for any damages     */
  14. /* arising out of your use of the sample code, even if they have been         */
  15. /* advised of the possibility of such damages.                                */
  16. /*                                                                            */
  17. /******************************************************************************/
  18. /*-------------------------------------------------------------*\
  19. |  xmulti1.C    -  Example of using the same collection from    |
  20. |                  multiple compilation units.                  |
  21. \*-------------------------------------------------------------*/
  22.  
  23.   #include <iostream.h>
  24.  
  25.   #include "xmulti.h"
  26.  
  27.   int xmulti2(MultiXampleStack&);  // In xmulti2.C
  28.  
  29.   int main()
  30.   {
  31.     MultiXampleStack mxs;
  32.     mxs.push(4711);
  33.     int i = xmulti2(mxs);      // A second use of MultiXapleStack
  34.     cout << "xmulti2 returned " << i <<".\n";
  35.     return (i != 4711);
  36.   }
  37.