枚举类型的变量不是类型名称?

时间:2017-02-24 04:17:25

标签: c++

运行以下代码时,我收到一条错误,说“形状”不是类型名称。有人可以帮忙吗?

#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;
}

0 个答案:

没有答案