c ++中未解析的外部符号

dat*_*ili 0 c++

#include <iostream>
#include <cstdlib>
using std::cout;
using std::endl;
using std::rand;
int man(){


    int t=rand();
    cout<<t<<endl;


     return 0;
}
Run Code Online (Sandbox Code Playgroud)

这里是用c ++生成随机数的代码,我有错误

1>c:\users\david\documents\visual studio 2010\Projects\random_function\Debug\random_function.exe : fatal error LNK1120: 1 unresolved externals
Run Code Online (Sandbox Code Playgroud)

请帮忙

SLa*_*aks 8

更改man()main().


小智 7

我,我想我会把"男人"变成"主人",看看会发生什么......