编译时出现这个是什么意思?
--------------------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;
}
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;
}
...全文
相关推荐
Java中泛型总结(推荐)
这种情况下,可以使用通配符 `?` 来描述任意类型,例如:`public static void fun(Message<?
c#基础常见面试题 对面试C#的人非常有帮助的
2. const 和 static readonly 区别? - const是常量,其值在编译时确定且不可改变,常量在编译时会被替换为实际值。
C#基础问题.doc
常量在编译时被内联,而 static readonly 字段在运行时才被初始化。3. extern 是什么意思?
【精品教程】C#基础概念二十五问.doc
const常量可以在编译时被嵌入到代码中,而static readonly变量在运行时才初始化。3. extern是什么意思?
Java基于final修饰数据过程解析
意思是,一旦你用 final 修饰一块数据,你之后就只能看看它,你想修改它,没门。


