i am having a problem with my code. I keep getting:
[Linker error] undefined reference to `play(int)'
ld returned 1 exit status
im pretty new at programming in c++, and from what i have found on the web, nothing much helped, and i think that the problem is really specific on the code. If anyone can offer help, i would be greatful.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
const int MIN_NUMBER = 1,
MAX_NUMBER = 100;
int randomNumber(int low ,int high);
int askNumber(int low,int high);
void welcomePlayer();
void play(int aSecretNumber);
int main(){
int low,
high;
srand(static_cast<unsigned int>(time(0)));
welcomePlayer();
int aSecretNumber = randomNumber(MIN_NUMBER, MAX_NUMBER);
play(aSecretNumber);
cin.ignore(1000,'\n');
cin.get();
return 0;
}
void welcomePlayer(){
cout << "Welcome to guess my number!!" << endl
<< "The computer will randomly generate a number betwneen 1 and 100, " << endl
<< "and you have to guess it." << endl
<< "Good Luck!" << endl;
}
int randomNumber(int low, int high)
{
int range = high - low + 1;
return ((rand() % range) + low);
}