Look at your code:
} int main()
struct Activities =
{
{1, 4}, {3, 5}, {0, 6}, {5, 7}, {3, 8}, {5, 9},
{6, 10}, {8, 11}, {8, 12}, {2, 13}, {12, 14}
};
{
Activity arr[N];
You can't declare anything between the function signature for main and the function body!
Move this:
int main()
below the definition:
}
struct Activities =
{
{1, 4}, {3, 5}, {0, 6}, {5, 7}, {3, 8}, {5, 9},
{6, 10}, {8, 11}, {8, 12}, {2, 13}, {12, 14}
};
int main()
{
Activity arr[N];
That will get rid of the problem, but will cause another error since neither the compiler or I have any idea what the
struct Activities = ...
is supposed to be ...