[求助]一个简单的过程但总是报错,不知道为什么
#include<iostream.h>#include<fstream.h>
#include<stdio.h>
#include<math.h>
void main(void)
{
int i,s;
s=0;
for (i=1;i<=30;i++)
{
s=s+i;
}
printf("%f\n",s);
}
编译:
Compiling...
111.cpp
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/111.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.