Help please.
Eric Ranaldi a.k.a RanBlade
[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...
[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."
[size=2]- Dave Pottinger, Ensemble Studios
[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]
[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]
Im sure it has nothing to do with your random number selection - its probably how you display the result but to be completely sure, i need to see some code. You never know where the bug might be

int HIGH = 5;
int WordPicker();
char Word();
int WordPicker()
{
int nWord;
time_t seconds;
time(&seconds);
srand((unsigned int) seconds);
nWord = rand() % (HIGH - LOW) + LOW;
return nWord;
}
char Word()
{
int nWord = WordPicker();
char* szWord[] = {"online", "game", "hat", "word", "diablo", "mom", "\0"};
return *szWord[nWord];
}
int main()
{
cout<< WordPicker() << " " << Word() << "\n";
return 0;
}
Eric Ranaldi a.k.a RanBlade
[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...
[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."
[size=2]- Dave Pottinger, Ensemble Studios
[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]
[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]
Eric Ranaldi a.k.a RanBlade
[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...
[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."
[size=2]- Dave Pottinger, Ensemble Studios
[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]
[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]
Eric Ranaldi a.k.a RanBlade
[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...
[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."
[size=2]- Dave Pottinger, Ensemble Studios
[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]
[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]
{
int nWord = WordPicker();
char* szWord[] = {"online", "game", "hat", "word", "diablo", "mom", "\0"};
return *szWord[nWord];
}
your returning only a char not a pointer to a char
change to char *Word()
char *Word()
{
int nWord = WordPicker();
char* szWord[] = {"online", "game", "hat", "word", "diablo", "mom", "\0"};
return szWord[nWord];
}
Eric Ranaldi a.k.a RanBlade
[size=1]"Passion is what drives you to stay up until 4am fixing that bug that hardly anyone would notice...
[size=1]Passion is where great games come from, if you dont live and breathe games you shouldn't be in the games industry."
[size=2]- Dave Pottinger, Ensemble Studios
[size=1][GameDev][C++ Page][Unity Game Engine][Panda3D Game Engine][NeHe Productions][Drunken Hyena][MSDN][Beej's Guide to Network Programming]
[size=1][FreedBSD][My Site][Gamasutra][Khan Acadamey]