Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么这程序在Link时候通不过!#include <iostream> #include <string.h> #include <math.h> using namespace std; //const int N=100001; char sub[101]; char str[101]; int len1; int len2; int mian() { int i,j; int equalNum; while(cin>>sub) { cin>>str; equalNum=0; len1=(int)strlen(sub); len2=(int)strlen(str); i=0;j=0; for(i=0; i<len1; i++) { while(j<len2&&str[j]!=sub[i]) j++; if(j<len2) { equalNum++; j++; } } if(equalNum==len1) { cout<<"Yes\n"; } else { cout<<"No\n"; } } return 0; } LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/1936.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. 1936.exe - 2 error(s), 0 warning(s) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator