Teigwaren is not a valid return type. If that is another class, then you'll need to include it in your include section. You may also want to include string so that you can use that string at the top.
Why did you writ all the code in German, if you don't mind me asking. Also, a suggestion for line 29 "Welchen Belag gefällt Sie?".
Well, I am a student at the Universität Heidelberg and there is an upcoming exam in c++. This is why I try to solve some of the exercises provided by out lecturer.
Here we have to program a class that creates a sandwich: You have different types of bread, you can add a topping and you are asked if you want to have butter on your sandwich. Dr. Kondermann wants us to use ENUM for the bread types and this is where I am struggling.
I changed the ENUM in line 14 to Teigwaren like Cubbi suggested, but when I created the following code to set and get a variable back I get error messages.
tobias@Lonestar:~/c++$ g++ SisV2.cpp -Wall
SisV2.cpp:7:3: error: ‘Teigwaren’ does not name a type
SisV2.cpp:19:1: error: ‘Teigwaren’ does not name a type
SisV2.cpp:20:1: error: expected unqualified-id before ‘{’ token
So my question is: Is "Teigwaren" not a type like int, float or bool?
Oh, right, I was referring to the second error on the list. Here's the whole thing, made to compile:
changes:
1. Declare Teigwaren before the first use
2. Chagne Teigwaren to Broetchen::Teigwaren when used outside class body
3. Remove stray semicolon after getT()