------------------------------------------------------------------------------
MC logo
PrintMe Class
[^] Code Examples
------------------------------------------------------------------------------
<<C++ Integer Stack Driver printme.h PrintMe2 Class>>
#ifndef _PRINTME_H_
#define _PRINTME_H_

#include <iostream>

/*
 * This class is constructed with an integer, which it
 * will print surrounded by [].
 */
class PrintMe {
    private:
        int num;                // Here is the number.
    public:
        // Remember the number.
        PrintMe(int m) { num = m; }

        // Print the string.
        void print() { cout << "[" << num << "]"; }
};

#endif
<<C++ Integer Stack Driver PrintMe2 Class>>