#include <iostream>
#include "Pizza.h"
int main() {
iFood* food;
food = new Pizza(14.0, 8);
for (int i = 0; i < 3; i++)
food->consume();
food->display();
std::cout << std::endl;
delete food;
food = new DeluxePizza(12.0, 6, "mushrooms, peppers");
for (int i = 0; i < 2; i++)
food->consume();
food->display();
std::cout << std::endl;
delete food;
}
This is my main.cpp when I run this code, it shows the warning that delete called on iFood that is abstract but has non-virtual destructor.