编译时出现这个是什么意思?

Divamm Divamm 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
--------------------Configuration: IAmAStudent - Win32 Debug--------------------
Linking...
Iam.obj : error LNK2005: _main already defined in main.obj
Debug/IAmAStudent.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

IAmAStudent.exe - 2 error(s), 0 warning(s)

我的程序很简单:
#include "string.h"
#include "iostream.h"
void main()
{
char sWord[128];
cout<<"Please input a line of text and press Enter."<<endl;
cin.getline(sWord,sizeof(sWord));
cout<<"you typed:"<<sWord<<endl;
}
...全文
评论 7
收藏 已收藏
分享
返回顶部
Divamm
C语言 70,039 成员 243,237 内容