This is a simple program, but keep in my my knowledge of C is also very simple. I'm getting parse errors in two areas in this program, and I'm not sure why:

-----------------------------
Code:
typedef  enum {
now=10,
next,
last
} grade;
typedef union
{
int age1;
float age2;
}age;

main()
{
struct {char name[20]; int age;} info;
grade now;
strcpy(info.name, "my name, which I don't feel comfortable posting");
info.age=15;
UNION age=info.age; //Parse error before 'union' (capitalized here so you can see it)

printf("This program is by %s, age %d. He is currently is grade %d." INFO.name, age.age2, grade); //parse error before 'info' (capitalized here so you can see it)
}
-----------------------------

There are probably other problems in this programs as well, but Dev isn't pointing them out. Any help would be greatly appreciated.

Last edited by shabbir; 23Jun2007 at 09:36.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code