各位大哥,帮我看看这个程序该怎么改,谢谢了
//program4_11.cpp
#include <iostream.h>
#include <math.h>
void main ()
{
const double pai=3.14159,a=16.0;
const int aspect=2;
double angle,p;
int x,y;
char rose [25][80];
for (x=0;x<80;x++)
for (y=0;y<25;y++)
rose [y][x] ='';
for (int i=0;i<128;i++)
{
angle=i*pai/64;
p=a*sin(2*angle);
x=int (p*cos(angle))*aspect+40;
y=int (p*sin(angle))+13;
rose [y][x]='*';
}
for (y=0;y<25;y++)
{
for (x=0;x<80;x++)
cout<<rose[y][x];
cout<<endl;
}
} %
--Configuration: Cpp10 - Win32 Debug--------------------
Compiling...
Cpp10.cpp
D:\My Documents\新建文件夹\Cpp10.cpp(13) : error C2137: empty character constant
D:\My Documents\新建文件夹\Cpp10.cpp(28) : error C2143: syntax error : missing ';' before '%'
执行 cl.exe 时出错.
Cpp10.obj - 1 error(s), 0 warning(s)
[此贴子已经被作者于2007-8-24 11:19:02编辑过]