0

エラーは次のとおりです。

mario.c:23:25: error: expected identifier or ‘(’ before ‘int’
for (int levelCounter, int usrHeight, int paddIt = usrHeight - 1, char hashMaker, int hashCounter;(levelCounter <= usrHeight);)

                      ^


mario.c:25:39: error: expected ‘)’ before ‘paddIt’
printf("%'' * paddIt %c*hashCounter"paddIt,hashMaker,hashCounter);
                                    ^

^ は、コンパイラがエラーが発生していると言っている場所を示します。

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

int main(void)
{
int usrHeight = 0;
int levelCounter = 0;
int paddIt = 0;
int hashCounter = 2;
char hashMaker = "#";

do 
{
    printf("How high?\n");
    int usrHeight = GetInt();
}
while ( usrHeight > 23 || usrHeight < 0);
if ( usrHeight >= 0 && usrHeight <= 23);
{
    printf("constructing...\n");

}
for (int levelCounter, int usrHeight, int paddIt = usrHeight - 1, char hashMaker, int hashCounter;(levelCounter <= usrHeight);)
                 *^ This is where the first error is occuring*
{
    printf("%'' * paddIt %c*hashCounter"paddIt,hashMaker,hashCounter);
                                                *^ And here is where the second is* 
    paddIt = paddIt - 1;
    levelCounter = levelCounter + 1;
    hashCounter = hashCounter + 1;
}
}

私がしていることが間違っているのは正確には何ですか?

4

2 に答える 2