(Beginner programmer..) I\'m following the style of a header file that worked fine, but I\'m trying to figure out how I keep getting all of these errors when I compile. I am com
That's a funny one. You are essentially killing your class name by #define Ingredient
- all occurrences of Ingredient
will be erased. This is why include guards generally take the form of #define INGREDIENT_H
.
You are also using name
both for the member and the getter function (probably an attempt to translate C#?). This is not allowed in C++.