input.push_back(987);*/
cout << "Return value: " << tc->sumArray(input) << endl;
-
delete tc;
+ vector<CallBackInterface*> test;
+ CallBackInterface *cb1 = new CallBack(12);
+ CallBackInterface *cb2 = new CallBack(22);
+ CallBackInterface *cb3 = new CallBack(32);
+ test.push_back(cb1);
+ test.push_back(cb2);
+ test.push_back(cb3);
+ for (CallBackInterface *cb : test) {
+ cout << "Test print: " << cb->printInt() << endl;
+ }
+
+ delete cb1;
+ delete cb2;
+ delete cb3;
+
return 0;
}