0
Beim Ausführen des folgenden Codes erhalte ich einen Fehler, der besagt, dass "Form" kein Typname ist. Kann jemand helfen?Variable vom Typ enum ist kein Typname?
#include <iostream>
using namespace std;
enum triangleType {scalene, isosceles, equilateral, noTriangle}; //Define an enumeration of possible triangle types
triangleType shape;
shape triangleShape(int a, int b, int c); //Declare prototype for function that calculates triangle type and returns enumeration
int main()
{
return 0;
}
'shape' ist eine Variable, deren Typ' triangleType', es ist kein Typname. – Barmar
Ahh ich verstehe. Was sollte die Funktion dann zurückgeben? DreieckTyp? – Froobyflake
Ja, das ist der Typname. – Barmar