The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
reverse an integer ali560045 Shell Programming and Scripting 4 05-20-2008 04:15 AM
Cannot store integer value bennichan Shell Programming and Scripting 5 04-10-2008 03:20 PM
awk or grep for integer only apalex UNIX for Dummies Questions & Answers 5 09-01-2004 02:38 PM
integer arrays primal High Level Programming 4 03-09-2002 05:40 PM
Integer to String psilva High Level Programming 2 08-17-2001 01:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-29-2001
toddor toddor is offline
Registered User
  
 

Join Date: Jun 2001
Location: china
Posts: 6
Red face How to get a rodom integer

hi

I want to get a rodom integer, but I just get the same integer while using the fuction rand() for the first time. So I wonder wether there is a way in which I can get an unknow random integer.

Thanks in advance
  #2 (permalink)  
Old 09-29-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
  
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
You can use srand() to seed a new sequence of
psudo-random numbers for rand(). You could
try using the the current time() value or
somthing like that.
  #3 (permalink)  
Old 10-10-2001
toddor toddor is offline
Registered User
  
 

Join Date: Jun 2001
Location: china
Posts: 6
thks

thks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:56 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0