#include <iostream>
#include <cstdlib>
using std::cout;
using std::endl;
using std::ra开发者_C百科nd;
int man(){
int t=rand();
cout<<t<<endl;
return 0;
}
here is code for generate random number in c++ and i have mistake
1>c:\users\david\documents\visual studio 2010\Projects\random_function\Debug\random_function.exe : fatal error LNK1120: 1 unresolved externals
please help
Change man()
to main()
.
Me, I think I'd change "man" to "main" and see what happens...
精彩评论