|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
--------------------Configuration: define - Win32 Debug--------------------
Compiling...
define.cpp
e:\study c\define\define.cpp(8) : fatal error C1083: Cannot open precompiled header file: 'Debug/define.pch': No such file or directory
执行 cl.exe 时出错.
define.obj - 1 error(s), 0 warning(s)
以下是我抄过来的代码
#include <stdio.h>
#define PRICE 30;
void main()
{
int num,total;
num = 10;
total = num * PRICE;
printf("total = %d\n",total);
}
不知道问题出在哪了
#define PRICE 30;这里把分号去掉
- #include <stdio.h>
- #define PRICE 30//多了个分号
- int main()
- {
- int num,total;
- num = 10;
- total = num * PRICE;
- printf("total = %d\n",total);
- }
复制代码
|
|