Samples Provided with IBM C and C++ Compilers

Samples are included for the compiler, the Integrated Resource Editor, and the IBM Open Classes.

Sample code and sample applications included with IBM C and C++ Compilers are all placed in the samples directory, under the main directory (IBMCXXW for Windows, and IBMCXXO for OS/2). Each sample is accompanied by a readme text file that describes the purpose of the sample, the concepts involved, and how to run it.

For example, if you are using Windows, the readme.txt file for the first sample, Authors1, would be found in:

X:\IBMCXXW\SAMPLES\COMPILER\AUTHORS\AUTHORS1

Where X: is the drive where IBM C and C++ Compilers is installed.

  Operating System Description Location of sample and readme file in SAMPLES directory:
Samples for the Compiler
Authors1 Example of building two identical data manipulation applications, one that uses basic C++ classes and one that uses the C++ template.
compiler\authors\authors1
Authors2 Example of building two identical data manipulation applications, one
that uses basic C++ classesand one that uses the C++ template .
compiler\authors\authors1
Geometric Area Two examples of DLL and C++ techniques.
compiler\sample07\method1
compiler\sample07\method2
Multithread Hello World Example of writing an application which synchronizes multiple threads using system event handlers.
compiler\sample02
Process Registration Subsystem DLL Creates a simple subsystem DLL, with an example of a DLL InitTerm function.
compiler\sample05
Run-Time Type Information Example of a C++ program that uses the new run-time type information supported by the compiler (typeid and the dynamic_cast operator).
compiler\rtti
Structured Exception Handling Opens a file and handles exceptions generated in manipulating the file.
compiler\seh
Thread Local Storage Provide Thread-Local Storage using the __thread keyword. Shows multiple threads modifying a static TLS variable.
compiler\tls
Three-Sort DLL Building and using a DLL, exporting functions using 3 techniques: #pragma export, the _Export keyword, and a module definition file. compiler\sample03
Sample for the IRE (Integrated Resource Editor)
Checkmark Example of building a custom resource (a custom check mark box) for use within the IRE.
pmcx\chmark
Samples for the IBM Open Classes
2-D Combo Graphics Programming with the 2-D Graphics classes. Tests of most primitive geometry and MGraphics objects.
ioc\graph2d\2dcombo
2-D Docs Graphics Programming with the 2-D Graphics classes.
ioc\graph2d\2ddocs
2-D Paint Programming with the 2-D Graphics classes Includes a toolbar and menu items for drawing the various MGraphic primitives on a canvas.
ioc\graph2d\2dpaint
Animals   Demonstrates key bags using the default class, IKeyBag. ioc\animals
Bar Chart   Demonstrates programming with the 2D Graphics classes. ioc\graph2d\barchart
Clipboard   Demonstrates containers with clipboard support. ioc\clipbrd
Code Translation Demonstrates use of maps to translate strings from EBCDIC to ASCII and from ASCII to EBCDIC.
ioc\transtab
Container   Demonstrates containers and container objects. ioc\cnr
Create your own Handler Demonstrates creation of an event handler using IHandler.
\ioc\ownhdr
DDE Client and Server   This sample contains two applications, DDE Client and DDE Server. They start DDE conversations with each other and perform data requests to the other application. You can also hotlink them together for automatic data requests. ioc\dde\ddeclnt, ioc\dde\ddeserv
Direct Manipulation 1   Demonstrates dragging and dropping text from entry fields. ioc\drag1
Direct Manipulation 3   Demonstrates dragging container objects from a source window to a target window. ioc\drag3
Direct Manipulation 4   Demonstrates dragging container objects across applications running in separate processes, that is separate executables. ioc\drag4
Disk Usage   Demonstrates sorted maps and relations using the default classes, ISortedMap and ISortedRelation. ioc\dskusage
Even-Odd   Demonstrates sets using the default class, ISet. ioc\evenodd
Expression   Demonstrates the multiway tree class, IMultiwayTree. ioc\expr
Hello World 1   The typical hello world program shows the basics of what is needed to get started ioc\hello1
Hello World 2   Replaces the trivial implementation of Hello1 with a more common programming approach. ioc/hello2
Hello World 3   Adds a menu bar and a command handler for handling the selection of the menu options. ioc\hello3
Hello World 4   Demonstrates the menu items for setting the alignment contain function key designations and adds a new menu item, Edit. ioc\hello4
Hello World 5   Adds a listbox and graphics window to the client area of the main frame window. ioc\hello5
Hello World 6   A complex sample with a large amount of common application functionality. It demonstrates many of the interactions and class usage required by a real user interface application. ioc\hello6
Key Sort   Demonstrates the default class IKeySet. ioc\intkyset
Lancelot   A complex sample that represents a typical customer application. Lancelot is a tool for tracking employees, employee time cards, and business projects. ioc\lancelot
Letter   Demonstrates the default class IDeque. ioc\letterdq
Listbox   Demonstrates adding and retrieving data from a listbox. ioc\listbox
Magnify   Demonstrates IImage, IGImage, IGrafport, IBitmapControl, INumericSpinButton, IFileDialog, and ITimer. ioc\graph2d\magnify
MMRemote   Demonstrates many of the multimedia functions. It takes the form of the universal remote control, which controls the CD player, video player, midi player, and wave player devices. ioc\mmremote
MMStereo Programming with the multimedia classes. Demonstrates amplifier, mixer and video and CD player.
ioc\mmstereo
Message Box Demonstrates messages boxes and multiline edit.
ioc\msgbox
Multicell Canvas   Demonstrates placement of objects on the IMultiCellCanvas. ioc\mcelcv
Multiline Entery Field   A simple editor opens existing files via the file dialog, saves data to a file with the file dialog, and changes fonts with the font dialog. It also cuts, copies, and pastes functions to the clipboard. ioc\mle
Notebook Demonstrates notebook, viewport and bitmaps, and demonstrates use of the INotebook class.
ioc\notebook
Notify Sample program for demonstrating IObserver, INotificationEvent, IEntryField.
ioc\notify
Parcel Demonstrates use of the default classes IKeySortedSet and IHeap
ioc\parcel
Planets Demonstrates use of the default class ISortedSet and sorting criteria.
ioc\planets
Set Canvas Demonstrates alignment of IBM Open Class User Interface Library objects on vertical and horizontal set canvases.
ioc\setcv
Split Canvas Demonstrates vertical and horizontal split canvases.
ioc\splitcv
Sum Up   Demonstrates an iterator object and an iterator function. ioc\sumup
Tab Control   Demonstrates the ITabControl and ITabPage classes. ioc\tabctl
Test Framework A set of samples to demonstrate writing software test classes using the Test Framework.
ioc\testfw
Tool Bar Sample 1 Demonstrates the toolbar, toolbar buttons, and flyover text within a simple editor.
ioc\tbar1
Tool Bar Sample 2 Demonstrates multiple toolbars and direct manipulation (drag/drop) of toolbars and toolbar buttons within a simple editor.
ioc\tbar2
Tool Bar Button Sample Demonstrates IToolBar, IToolBarButton, IFlyText, IFlyOverHelpHandler.
ioc\tbarbutn
Version Displays the IBM Open Class: User Interface Library version number.
ioc\version
View Port Illustrates the viewport's ability to scroll a window that is not completely visible due to its size, using IViewPort and IBitmapControl.
ioc\vport
Word Bag Illustrates the use of a key-sorted bag, using IKeySortedBag.
ioc\wordbag
Word Sequence Creates a sequence using ISequence. ioc\wordseq
Word Stack Demonstrates the use of the default class IStack and push() and pop() functions. ioc\pushpop