Ok, so I've gotta print this pattern and main has already been defined. I just need to create the function that main calls and define it. The problem is that the compiler keeps coming up with an error in main that the function has too many arguments, here is what I have:

#include <stdio.h>

int print_line (void) {
int i;
i = 1;
while (i < 6) {
printf("*", i);
i = i + 1;
}
while (i > 0) {
printf (" ", i);
i = i - 1;
}
while (i < 6) {
printf ("*\n", i);
i = i + 1;
}
return 0;
}

int main (void) {
int i;
i = 1;
while (i < 6) {
print_line(i, 11-2*i);
i = i + 1;
}
print_line(6, 0);
i = 5;
while (i > 0) {
print_line(i, 11-2*i);
i = i - 1;
}
return 0;
}

The instructions doesn't actually say that I need to create function print_line but that I need to define print_line. It needs to have 3 loops, one for the number of spaces in each line and 2 for the number of asterisks in each line.

I know now that this is C and it is posted in a C++ forum but I couldn't find a C forum on the site anywhere and as last time I'm not looking for the answer by no means, but just a nudge in the right direction.