Upcast the pointer for calculator to a base type to employ polymorphism

This commit is contained in:
alex committed 2026-04-01 23:45:48 +03:00
1 parent 688f490ec1
commit 78ada5fbd4
1 file changed
+1 -1
+1 -1
View File
@@ -6,7 +6,7 @@
int main() int main()
{ {
auto calc = std::make_unique<BaseCalculator>(); std::unique_ptr<BaseCalculator> calc = std::make_unique<SpecialCalculator>();
std::cout << "Initializing calculator"; std::cout << "Initializing calculator";