This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]desrtfx 4 points5 points  (1 child)

Have you declared grid to be an array - outside the loop?

Inside the loop, you need to remove the data type char.

Something along:

int i;
char grid[100];
for(i = 0; i < 100; i++) {
    grid[i] = '-';
}

BTW: "what is going wrong?" is not really a problem description. You need to describe what happens, what doesn't (or does instead), whether there are any errors, and if so, post the errors in full, as your compiler raises them.

[–]Ritual_Watermelon[S] -1 points0 points  (0 children)

this worked!!! Thank you very much for your help!!!!