Multiple Print Tester 2
#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 { private: int count; // Here is the repeat count. public: // 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--) PrintMe2::print(); } }; #endif