07-8-2007, 09:12 AM | #1 |
FFR Player
Join Date: Jul 2007
Posts: 1
|
multiple definitions error, what's wrong?
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 |
07-8-2007, 10:02 AM | #2 | |
FFR Player
Join Date: Apr 2007
Age: 35
Posts: 230
|
Re: multiple definitions error, what's wrong?
My coding style is completely different so its hard to tell where the problem is. However,
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|