123456789101112131415161718192021222324252627282930
class X { public: X(int kk) : k(kk) { items = new int[k]; for (int i = 0; i < k; i++) items[i] = i; } ~X() { delete[] items; } void equal(X d) {} private: int k; int *items; }; int main() { X e(2); X f(2); e.equal(f); return 0; }