【发布时间】:2015-11-01 05:01:32
【问题描述】:
我是 C++ 的初学者,我想学习,因为我正在学习软件工程,我买了一本书,我试图在 dev c++ 中做这些例子,但我遇到了一个错误,我无法在网上找到解决方案。下面是代码和错误;
#include <stdio.h>
#include <conio.h>
main()
{
char a;
int i;
i =-+;
while (i=255) {i++;
printf("%.3d. Alphabet: %c\n",i,i);
a= getch();
};
}
书中说输出是这样的;
- 字母:A
- 字母:B 等等..
问题是当我按下编译它说;
[Error] expected primary-expression before ';' token
谁能告诉我这是什么?
【问题讨论】:
-
复制粘贴错误:i=-+;而(i=255)