#include <stdio.h>
#include <cs50.h>

void printRow(int);

int main()
    int Height = 0;
    int Row = 0;
    int i, j;

        printf("enter the height of half pyramid: \n");
        scanf("%i", &Height);

        return Height;

        for(i = 1; i <= Height; i++)
          for(j = 1; j < i; Row++);
          printf("%Height +1i", printRow(Row));

void printRow(int Row)

this is my code but for some reason there is a problem with the printRow()function.this is what the compiler outputs:

/home/ubuntu/workspace/pset1/ $ make mario
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    mario.c  -lcs50 -lm -o mario
mario.c:21:24: error: argument type 'void' is incomplete
          printf("%i", printRow(Row));
1 error generated.
make: *** [mario] Error 1
/home/ubuntu/workspace/pset1/ $ 

what does it mean by 'the argument void is incomplete?

2 Answers 2


OK first of all you need to format your code correctly. The %Height is incorrect. You need to %d, %i, %s (data types - Height is not a data type). That's the obvious mistake I found looking at the problem. The +1i (not sure what you are trying to do, should be after the comma - not inside the "").


The problem is that the function pre-definition is different from the real one:

 1 #include <stdio.h>
 2 #include <cs50.h>
 4 void printRow(int);
32 void printRow(int Row)
                     Different here

Also, the Row parameter is doing nothing, and "%Height" is incorrect. it should be "%s", "%i", "%d", or one of them from here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .