[求助]示例程序build时出现link错误
编译没错,build提示有link问题,修改了project->setting的subsystem后还错,不知错哪了,请教各位!谢啦!
程序如下:
#include<string>
#include<iostream>
#include<fstream>
using namespace std;
int mian()
{
ifstream in("test_sys.cpp");
ofstream out("test1.cpp");
string s;
while(getline(in,s))
out<<s<<"\n";
return 1;
}
--------------------Configuration: test1 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/SSymm.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.