Code:
user@0[~]$ g++ -W -Wall -ansi -pedantic -O2 -o t t.c
t.c:2:19: conio.h: No such file or directory
t.c: In function `int main()':
t.c:6: error: use of enum `Days' without previous declaration
t.c:6: error: `sunday' undeclared (first use this function)
t.c:6: error: (Each undeclared identifier is reported only once for each
function it appears in.)
t.c:6: error: `monday' undeclared (first use this function)
t.c:6: error: `tuesday' undeclared (first use this function)
t.c:6: error: `wednesday' undeclared (first use this function)
t.c:6: error: `thursday' undeclared (first use this function)
t.c:6: error: `friday' undeclared (first use this function)
t.c:6: error: `saturday' undeclared (first use this function)
t.c:7: error: `Days' undeclared (first use this function)
t.c:7: error: parse error before `;' token
t.c:9: error: `off' undeclared (first use this function)
t.c:18: error: `getch' undeclared (first use this function)
user@0[~]$
One of your problems is this:
Code:
enum Days (sunday=1,monday,tuesday,wednesday,thursday,friday ,saturday);
You used () instead of {}.
When you cin>>an enum, the user has to enter an integer, not "saturday" as you might expect.