无法解析的外部命令。fatal error LNK1120: 1 个无法解析的外部命令

//Ex2_01.cpp//ASimpleExampleofaprogram#include<iostream>usingstd::cout;usingstd::endl... // Ex2_01.cpp
// A Simple Example of a program
#include <iostream>
using std::cout;
using std::endl;

int main()
{
int apples, oranges;
int fruit;

apples = 5; oranges = 6;
fruit = apples + oranges;
cout <<endl;
cout <<"oranges are not the only fruit..."<<endl
<<"- and we have" << fruit<<"fruits in all,";
cour <<endl;

return 0;
}
1>LINK : error LNK2001: 无法解析的外部符号 _mainCRTStartup
1>d:\我的文档\visual studio 2010\Projects\Ex2_01\Debug\Ex2_01.exe : fatal error LNK1120: 1 个无法解析的外部命令
1>
1>生成失败。
1>
哪里错了啊。。??
用的是win32控制台应用程序。
展开
 我来答
L_o_o_n_i_e
2011-04-27 · TA获得超过4.2万个赞
知道大有可为答主
回答量:8507
采纳率:38%
帮助的人:5448万
展开全部
cour <<endl; -- cout 打错了一个字母。是 t 不是 r.
头部用:
#include <iostream>
using namespace std;
不要用:
using std::cout;
using std::endl;
更多追问追答
追问
嗯改了还是这样。什么情况??谢谢
1>LINK : error LNK2001: 无法解析的外部符号 _mainCRTStartup
1>d:\我的文档\visual studio 2010\Projects\Ex2_01\Debug\Ex2_01.exe : fatal error LNK1120: 1 个无法解析的外部命令
1>
1>生成失败。
追答
源程序扩展名用  .cpp 了吗?
完整程序:
#include
using namespace std;

int main()
{
int apples, oranges;
int fruit;

apples = 5; oranges = 6;
fruit = apples + oranges;
cout <<endl;
cout <<"oranges are not the only fruit..."<<endl
<<"- and we have" << fruit<<"fruits in all,";
cout <<endl; // t

return 0;
}
yansao29
2011-04-27 · TA获得超过985个赞
知道小有建树答主
回答量:1321
采纳率:0%
帮助的人:0
展开全部
fatal error LNK1120: 1 个无法解析的外部命令 1>生成日志保存在“file:/ 第三行: int mian() main 你写错了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式