I am attempting to do the following problem below:
I have made my code as the following to attempt to follow the instructions but I'm having issue with that and have done this instead:
//Include statements
#include <iostream>
#include <string>
using namespace std;
//Global declarations: Constants and type definition only -- no variables
//Functions prototypes
int main()
{
//Variable declarations
int factorial(int n);
int factorial(int r);
int main();
double n = 18.0;
double r = 3.0;
//Program logic
cout << "Hello there, stranger! How are you today?" << endl;
cout << " " << endl;
cout << "I am here to inform you that the number of teams that can be arranged is: "
<< factorial(n) * factorial(r) << endl;
//Closing program statements
system("pause");
return 0;
}
//Function definitions
I am getting this error:
Error LNK2019 unresolved external symbol "int __cdecl factorial(int)" (?factorial@@YAHH@Z) referenced in function _main
Can someone tell me what this means and how to fix it? Thank you!