// testcomplex.cpp - tests complex number template #include using namespace std; #include "complex.h" int main() { Complex c1(1, 2), c2(c1); // specify type int Complex<> c3(3.4, 5.67), c4(c3); // default type is double cout << "Objects: \n" << " c1: " << c1 << '\n' << " c2: " << c2 << '\n' << " c3: " << c3 << '\n' << " c4: " << c4 << '\n'; cout << "Counters: \n" << " Complex: " << c1.getCount() << '\n' << " Complex: " << c3.getCount() << '\n' << " Complex: " << Complex::getCount() << '\n'; }