
-----------------------------------
abcdefghijklmnopqrstuvwxy
Tue Jun 26, 2007 1:35 pm

Trying to use class from GNU C++ library
-----------------------------------
Hi, I am needing a random number generator more sophisticated than rand() and so I found this 

ACG rNum((unsigned)time(0), 7); //ACG::ACG(seed, size) 


But of course it won't compile because ACG isn't declared.  The documentation doesn't give any examples of using ACG nor does it tell you what files to include.  Does anyone know what files i need to include?

Also i tried getting other random number generators but I don't know how to install the libraries... i figure the GNU C++ library is already installed so. . . ya

-----------------------------------
Dan
Tue Jun 26, 2007 5:32 pm

RE:Trying to use class from GNU C++ library
-----------------------------------
Why do you need a random number generator behond what c++ provids?

-----------------------------------
md
Wed Jun 27, 2007 12:26 am

RE:Trying to use class from GNU C++ library
-----------------------------------
Because there are better random number generators? The standard C++ RNG is not cryptographically secure which is another reason to use something else.

You would need to have the source code for that particular library; from the looks if it it's from Art of Computer Programming, Vol III. Since finding the actual code might be difficult you could always implement the mersenne twister. Or download a library that does it if you are lazy.

-----------------------------------
wtd
Wed Jun 27, 2007 11:49 am

RE:Trying to use class from GNU C++ library
-----------------------------------
Why would you need the source?

You just need a header file, and the appropriate library to link against.

-----------------------------------
abcdefghijklmnopqrstuvwxy
Wed Jun 27, 2007 5:11 pm

Re: Trying to use class from GNU C++ library
-----------------------------------
yeah i think he means the source so i can see what libraries i need to include.  I thought this ACG random number class would be in the gnu c++ library which i think is included in the standard gcc?  If not than can someone tell me how to install a random number generator library... i'm confused about all this linking and stuff and my programs never compile...
