I'm new to coding and I am trying to complete this assignment, but I can't get it to work:
Write and use a function that takes a mask as an argument and returns a structure.
Here is what I've done so far. Can someone help me understand what I'm doing wrong?
typedef enum {
fast = 1,
slow = 2,
strong = 4,
smart = 8,
agile = 16,
}Skills;
typedef struct _Team {
int ranking;
char name;
} Team;
Team Alabama;
Team USC;
Team _function (Skills skills);
Team _function (Skills skills) {
if (skills == (fast | smart)) {
return Alabama; }
if (skills == (fast | agile))
return USC;
else
return nil;
}