请教一个代码
#include<stdio.h>
main()
{
int i=1,j=0;
char k,m;
scanf("%c",&k);
while(i++<=k-64)
{
while(j<2i-3)
{
m='A'+j++;
printf("%c",m);
}
j=0;
}
}
编译信息:
g++.exe -x c++ -c E:\编程\c文件\bbb -o E:\编程\c文件\bbb.o -Wall -fpermissive -Wno-sign-compare -g
E:\编程\c文件\bbb:3: warning: ISO C++ forbids declaration of `main' with no type
E:\编程\c文件\bbb: In function `int main()':
E:\编程\c文件\bbb:9: error: invalid operands of types `int' and `int __complex__' to binary `operator<'
Failure
为什么编译失败呢