user466534
user466534

Reputation:

Unresolved external symbol in c++

#include <iostream>
#include <cstdlib>
using std::cout;
using std::endl;
using std::rand;
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

Upvotes: 0

Views: 275

Answers (2)

PSUnderwood
PSUnderwood

Reputation: 90

Me, I think I'd change "man" to "main" and see what happens...

Upvotes: 7

SLaks
SLaks

Reputation: 888077

Change man() to main().

Upvotes: 8

Related Questions