Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew Topic
How To Get The Random.h Header
demolaynyc
post Dec 9 2006, 05:21 AM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 330
Joined: 2-February 06
Member No.: 11,040


Hi, I'm currently looking for a header file I really need. It's a random.h header file. Is there a way that someone can send it to me? I know there is a rand() function in stdlib.h but I prefer to use the random.h one because it's being used for my school.
Go to the top of the page
 
+Quote Post
tansqrx
post Dec 9 2006, 05:56 AM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 566
Joined: 25-April 05
Member No.: 4,374
myCENTs:33.04


Its been awhile since I fooled with c header files but I will give it a shot. Assuming your programming department does not use a special internal random.h file, the most common appears to be this one: http://www.ks.uiuc.edu/Research/namd/doxyg..._8h-source.html
Go to the top of the page
 
+Quote Post
yordan
post Dec 12 2006, 02:49 PM
Post #3


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,292
Joined: 16-August 05
Member No.: 7,896
myCENTs:99.39


There is a random.h file here : http://www.ks.uiuc.edu/Research/namd/doxyg..._8h-source.html
also have a look here : http://www.google.fr/search?hl=fr&q=ra...oogle&meta=
Regards
Yordan
Go to the top of the page
 
+Quote Post
sones77
post Mar 25 2007, 04:40 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 25-March 07
Member No.: 21,074


QUOTE(yordan @ Dec 12 2006, 04:49 PM) [snapback]93667[/snapback]

with that random.h file I can generate numbers? ints?
Go to the top of the page
 
+Quote Post
yordan
post Mar 25 2007, 05:35 PM
Post #5


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,292
Joined: 16-August 05
Member No.: 7,896
myCENTs:99.39


QUOTE
With that random.h file I can generate numbers? ints?

Have a look at the C language programming guide, looking for the syntax of the rand() function.
You will probably have to get a random number between O.0 and 1.0, multiply it by 100 and look for the nearest integer.
Yordan
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   11 ViRuaL 2,360 10th December 2008 - 10:14 PM
Last post by: iG-nick
No New Posts   3 Sir Joe 2,025 2nd December 2008 - 03:14 AM
Last post by: iG-Ben and Hank
No New Posts 13 FirefoxRocks 465 24th November 2008 - 03:54 AM
Last post by: FirefoxRocks
No New Posts   7 eina 374 20th November 2008 - 11:30 PM
Last post by: tansqrx
No New Posts   2 khalilov 315 25th July 2008 - 03:30 AM
Last post by: Mike gambino
No New Posts   6 tomtrak 3,032 13th July 2008 - 07:33 AM
Last post by: iGuest
No New Posts   0 magiccode9 497 22nd June 2008 - 07:06 PM
Last post by: magiccode9
No New Posts   4 Feelay 433 8th May 2008 - 10:20 AM
Last post by: Jared
No New Posts   6 sxyloverboy 2,501 7th May 2008 - 03:34 PM
Last post by: iGuest
No New Posts   6 soleimanian 2,251 2nd May 2008 - 12:36 PM
Last post by: iGuest
No New Posts   1 toby 808 30th January 2008 - 09:52 AM
Last post by: yordan
No New Posts   0 masterio 1,912 30th January 2007 - 08:14 AM
Last post by: masterio
No New Posts   2 Vyoma 2,741 14th October 2006 - 07:19 AM
Last post by: Vyoma
No New Posts   2 lonebyrd 766 1st October 2006 - 03:32 AM
Last post by: lonebyrd
No New Posts   3 pyost 927 28th August 2006 - 09:26 PM
Last post by: vhortex