错误C:\Users\yiersan\Desktop\collect2.exe [Error] ld returned 1 exit status
#include<iostream>#include<cstdlib>
#include<string>
#include<sys/time.h>
namespace std{
void sayhello(){
std::cout<<"in sayhello()\n";
}
}
using namespace std;
int main(){
sayhello();
string error="error !! then return -1";
int k=rand()%100;
//srand(time(0));
int i=rand()%2146+1;
cerr.operator<<(i);
for(int j=0;j<k;j++){
if(i+100>=2147)
cout<<error<<endl;
else
{
i++;
}
}
clog.operator<<(i) ;
return 0;
}