I think the problem I'm having is that C++ cannot work with class instances without initializing them in a more explicit way than I am doing, but I'm not sure how to solve this... maybe there's an easy solution but it isn't obvious to me. does someone see another approach to this? or a way to make this forward declaration work?
two main errors I'm getting are:
1) forward declaration of struct 'Topping' (at the 1st line - class Topping)
2) invalid use of undefined type struct 'Topping' (at the 2nd line -class Sausage : public Topping)
Forward declaration is only enough when all you have is pointers or references to objects of that class. As soon as you start to call functions, inherit from or in other ways using the class you need to have defined the class before that.
In your code you must put the class definition of Topping before all the other classes that use it. If you do that you will get a problem because the new_topping function is using other classes that is not yet defined. What you can do is to only have the function declaration inside the class definition and put the function definition outside the class definition after the other classes.
In bigger programs you often separate code into different files and have class definitions and function declarations in a header file and all the function definitions in a source file. When getting used to this it becomes easier and you don't have to think much about what order to define things in as you have to do if you put everything in one file like you do.