Reputation: 77
I've searching for hours for that problem and still cant fix it.
#include <iostream>
using namespace std;
enum color { brown, green, orange, red, yellow };
enum yn { yes, no };
struct Fruit {
private:
char name[32];
color cl;
yn annual;
yn perennial;
yn tropical;
public:
};
int main()
{
system("pause");
return 0;
}
function yn is not a type name
.
'annual, perennal, tropical' unknown override specifier
.
Upvotes: 0
Views: 148
Reputation: 144550
yn
is the name of the Bessel function of the second kind for order n. It may be defined as double yn(int n, double x);
in <math.h>
.
You do not include <math.h>
in the example, but probably do in your code. It is possible that your compiler gets confused about this. Try renaming the enum to enum yesno { yes, no };
Upvotes: 2