MC logo
PrintMeLots2 Class
[^] CSc 220 Home
[Introduction] [Boolean and Control] [Functions] [Arrays and Pointers] [Dynamic Arrays] [Array Errors] [Command Array] [Standard Containers] [Structs and Classes] [Automatic Pointer] [Multi-File Programs] [Copying Objects] [Templates] [Inheritance] [Plain C I/O] [Type Odds And Ends] [Plain C Strings] [File I/O]
[Bounded Safe Array] [Bounded Safe Array Driver] [PrintMe Class] [PrintMe2 Class] [PrintMeLots Class] [PrintMeLots2 Class] [PrintMe Test Driver] [Linked List Node Classes] [Linked List Classes] [Linked List Implementation] [Linked List Driver] [Expression Calculator]
#ifndef _PRINTMULT2_H_
#define _PRINTMULT2_H_

#include <iostream>

 * This class is constructed with an integer, which it
 * will print repeatedly surrounded by [].
class PrintMeLots2: public PrintMe2 {
        int count;              // Here is the repeat count.
        // Remember the number.
        PrintMeLots2(int num, int cnt): PrintMe2(num) { 
                count = cnt;

        // Print the string.
        virtual void print() { 
                for(int m = count; m > 0; m--)