In my header file, I have this.....

/* be sure to.... #include "tylersfunctions.h" in the program*/ #ifndef TYLERSFUNCTIONS_H_INCLUDE #define TYLERSFUNCTIONS_H_INCLUDE using namespace std; int Atk = 10; int random(int n); int fact(int n); int nCr(int n, int r); int CalcDamage(int Atk, int randnump); /*returns a random number that is between 1 and the number that you pass to it it's form is... random(#); where # is the number/variable you want to pass to it also include these #include <math.h> #include <stdlib.h> #include <time.h>*/ int random(int n) { return rand() % n+1; } int nCr(int n, int r) { int sum = 0; sum = (fact(n))/(fact(n-r) * fact(r)); return sum; } int fact(int n) { int sum = 1, i = 1; while (i <= n) { sum = sum * i; i++; } return sum; } int CalcDamage(int Atk, int randnump) { int damage; damage = Atk + Atk % nCr(random(randnump), random(randnump-1)); return damage; } #endif //TYLERSFUNCTIONS_H_INCLUDE

And in the main function I have this.....

#include <windows.h> #include <stdio.h> #include <conio.h> #include <strsafe.h> #include <iostream> #include <math.h> #include <stdlib.h> #include <time.h> #include <fstream> #include <string> #include "tylersfucntions.h" using namespace std; int main() { int playerrand; while (1) { cout << "Random number for player: "; cin >> playerrand; cout << endl << CalcDamage(Atk, playerrand) << endl; } return 0; }

Yes, there are some what appear to be extra includes that I don't need. But I chopped out a few of the extra functions that I know are not causing the problem from my header file. Any help is appreciated.