這里是哪里錯了啊 應該怎么修改!!???
首先這個是在這個網(wǎng)頁上可以運行成功的?
然后我去VC6.0中又試了一遍 然后出錯了 一個是預處理命令的錯誤 然后我就沒用那個預處理了 結果輸出那里就出錯了 可以幫我看看嘛
...圖好像發(fā)不出來了 程序是這樣的?
#include "stdafx.h"
#include <stdio.h>
int main()
{
? ? int sale=120; //銷售業(yè)績?yōu)?20萬
? ? int year=1; //剛剛進入公司1年
? ? //完善代碼
? ? if(sale>100)
? ? if(year>=2)
? ? {
? ? ? ? printf("%s\n","恭喜您,獲得獎勵");
? ? }
? ? else
? ? {
? ? ? ? printf("%s\n","很遺憾,期望你再接再厲");
? }
? ? return 0;
}
然后 出錯是這樣的?
Compiling...
practise1.cpp
Linking...
LINK : fatal error LNK1168: cannot open Debug/practise1.exe for writing
執(zhí)行 link.exe 時出錯.
去掉預處理命令<stdio>之后出錯是這樣的
Compiling...
practise1.cpp
E:\VC6.0\MyProjects\practise1\practise1.cpp(12) : error C2065: 'printf' : undeclared identifier
執(zhí)行 cl.exe 時出錯.
2019-05-10
為什么有兩個頭函數(shù),去掉第一個應該就對了