I'm getting an error when I try to compile one of my headers. I'm using DevCPP, if that matters. Its a dice roller for a rouge-like I'm trying to write, taking in 2 variables in the format of XdY (for those of you who roleplay).
coding follows...
#ifndef _DICEBAG_H_
#define _DICEBAG_H_
using namespace std;
int diceroll(int numof, int numside) {
int total = 0;
for(int curroll = 0; curroll < numof; curroll++) {
total += rand() % numsides + 1;
}
return total;
}
#endif
coding follows...
#ifndef _DICEBAG_H_
#define _DICEBAG_H_
using namespace std;
int diceroll(int numof, int numside) {
int total = 0;
for(int curroll = 0; curroll < numof; curroll++) {
total += rand() % numsides + 1;
}
return total;
}
#endif


Comment