输出图形的代码 有报错但我不知道怎么改 c++ 输出图形的代码 有报错但我不知道怎么改 有点看不懂 ```c++ #include<stdio.h> int main() { char a[][7

输出图形的代码 有报错但我不知道怎么改
c++
输出图形的代码 有报错但我不知道怎么改 有点看不懂

#include<stdio.h>
int main()
{

char a[][7]={
   
   {' ',' ',' ','*',' ',' ',' '},{' ',' ','*','*','*',' ',' '},{' ','*','*','*','*','*',' '},{'*','*','*','*','*','*','*'},{' ','*','*','*','*','*',' '},{' ',' ','*','*'',*'',' ',' '},{' ',' ',' ','*',' ',' ',' '}}
int i,j;
for(i=0;i<=6;i++)
{        for(j=0;j<=6;j++)
        printf("%c",a[i][j]);
    printf("\n");
}
return 0;
}

```:\Users\lll18\Desktop\C语言代码\Debug\Cpp1.cpp(5) : error C2059: syntax error : 'constant'
C:\Users\lll18\Desktop\C语言代码\Debug\Cpp1.cpp(5) : error C2001: newline in constant
C:\Users\lll18\Desktop\C语言代码\Debug\Cpp1.cpp(7) : error C2065: 'i' : undeclared identifier
C:\Users\lll18\Desktop\C语言代码\Debug\Cpp1.cpp(8) : error C2065: 'j' : undeclared identifier
Error executing cl.exe.

Cpp1.obj - 4 error(s), 0 warning(s)

猜你喜欢

转载自blog.csdn.net/zezeaichirou/article/details/134627030