Re: Trying to animate sprite using DirectX9 Programming Software Development by Pavel_11 Hello, it is unneccessarily to use right movex or leftmovex , because it is to much variables. You should to use one variable movex to make it with minus or plus sign in your update function; by pressing left or right keys; because the one thing which is changable is a picture; I mean in global sense; variables like leftx, right x should be one… Re: Change-a-Letter-or-Two-Game Community Center Geeks' Lounge by christina>you seed Re: Shuffling a 2d array. Perhaps just a simple syntax error? Programming Software Development by Lerner seed the generator just once at the start of the program, not every time you call random. Since the time it takes the computer to do the separate function calls is so short there isn't enough time to make a difference in the seeding so it's seeding with the same number every time. Re: Random Bill Function Programming Software Development by L7Sqr Seed your random number generator (srand - or one of it's …; std::endl; return 0; }[/code] [edit] You'll want to seed drand48 with srand48. Re: Coin flipping program, so close to finishing Programming Software Development by Dave Sinkula Seed the random number generator only once in your program. Move your srand call to main, before your for loops. Re: Time To Wake everyone up - Words Within Words Community Center Geeks' Lounge by crippendale seed, scad, deed alternatively Re: Time To Wake everyone up - Words Within Words Community Center Geeks' Lounge by Jishnu seed, bless, led however Re: Mastermind program Programming Software Development by Hiroshe Seed the prng with the time. See the example on the end of [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"]this[/URL] page. I wonder why the example has a combination of puts() and printf(). :P Re: Random Bill Function Programming Software Development by L7Sqr Seed your random number generator (srand - or one of it's … Re: seed and random number generator Programming Software Development by VernonDozier … I had edited the last post. You have to actually SEED it too. Forgot that before. See red line. [code…] cout<<"Enter a seed value : "; int seed = 0; cin >> seed; while(seed < 0) { cout<&…non negative number : "; cin >> seed; } [COLOR="Red"] srand (seed);[/COLOR] for(int i = 0 ; i <… Re: seed and random number generator Programming Software Development by VernonDozier … how about if you are only to enter a seed number one time to initialize the integer generator rand()?[/…] cout<<"Enter a seed value : "; int seed = 0; cin >> seed; while(seed < 0) { cout<<…;"\nEnter non negative number : "; cin >> seed; } for(int i = 0 ; i < 100; i++) { cout… Re: seed and random number generator Programming Software Development by mrnutty …++) { cout<<"Enter a seed value : "; int seed = 0; cin >> seed; while(seed < 0) { cout<<"…;\nEnter non negative number : "; cin >> seed; } cout<<"\nYour random number is : "<… seed and random number generator Programming Software Development by skiing I have a question we are suppose to input a seed value for a randon number generator, but I am having issues with using the srand(seed), but the problem is I am getting the same output every time for the random numbers how can I do it with the user entering a seed not srand(time(null)) and get differn't random numbers. Re: seed and random number generator Programming Software Development by mrnutty Oh silly rabbit, I forgot to seed the seed also. Re: seed and random number generator Programming Software Development by skiing I know that but how about if you are only to enter a seed number one time to initialize the integer generator rand()? Re: Random number generator with seed Programming Software Development by bguild … no reason to worry about that. Just pretend that the seed is a totally meaningless number and it doesn't matter… what seed you choose. If you want to test your application with… satisfied your application always works. Or you could choose the seed by rolling some real dice. If `Random` is doing its… Re: Random number generator with seed Programming Software Development by mvmalderen … generating numbers from? *The class uses a 48-bit seed, which is modified using a **linear congruential formula**.* (Source… the no argument constructor of Random. It will seed the random number generator automagically to a value that…a new random number generator. **This constructor sets the seed of the random number generator to a value very … Re: Is there a Poisson RNG that is seed-less? Programming Computer Science by Narue …for parallel-programming >and I need it to be seed-less to ensure concurrent execution. No, you just need the… all threads share the same resources (which includes the global seed if you're using something like C++'s rand). The… opinion is to write a good generator that has the seed passed in as part of the interface: [code=cplusplus] #… Random Function with Time seed Programming Software Development by slimjimmer … random numbers so I decided to use time as a seed. However I can't seem to get this to work…;time.h> int main() { int random, seed, time; seed = (int) time(NULL); random = rand(seed); printf("random number = %d\n"… Random number generator with seed Programming Software Development by Violet_82 … having `Random randomNumbers = new Random();` we should provide a seed argument like this `Random randomNumbers = new Random(seedValue);` So… now is this: which number should I use as seed? I mean can I use any number, say 1… `Random randomNumbers = new Random(25);` I mean the seed is where the random generator is supposed to start generating… Is there a Poisson RNG that is seed-less? Programming Computer Science by hpr Hi guys, I've been going around the web (whatever that means) in search of a seed-less poisson RNG. It's because I'm going to generate poisson random deviates for parallel-programming and I need it to be seed-less to ensure concurrent execution. Cheers Re: Random number generator with seed Programming Software Development by Violet_82 thanks for the replies guys. When I asked the question, I suspected I didn't really need to worry about the number that goes as seed, it was just something I was curious to know. After having read your answers and duly checked the links provided, I came to realize that sometimes ignorance is bliss : - )! thanks Re: Is there a Poisson RNG that is seed-less? Programming Computer Science by gusano79 … same seeded PRNG in each parallel process, but generate the seed globally so each process will generate the same numbers. [*]If… largest value in a seed random number generator Programming Software Development by melissa.johns …" numbers, I set up the program to get the seed from the cpu time. Then, to get the number between… bool argument problem for random seed. Programming Software Development by burcin erek …[]); // making zero int sayisec(bool sayi[]); // choosing number from random seed int xx[11]; // random numbers will be assigned to xx… Game of Crap Programming Software Development by freakgamerz …for random seed: "; cin>>seed; if (seed == 0) { srand(seed); } while (seed <0 || seed >… 50) { cout<<"Invalid seed…endl; cout<<"Enter seed: "; cin>>seed; } srand(seed); } //Name:getPrintDetails //Purpose: //… C++ Poker Game: Determining Full House Programming Software Development by redwolf99 …DrawCard(Card); DisplayCard(Card); SortCard(Card); seed = determineReward(Card, seed, bet); playGame(Card, seed); return 0; } else { cout…initial balance was: $" << seed << endl; seed = seed - bet; cout << "…inintial balance was: $" << seed << endl; seed = seed + bet; cout << "… Can you help me in correcting the errors in my this program? Thank you. Programming Software Development by Ieako …y[station]=(minimal(seed)%passengerlimit[station])+1; seed=minimal(seed);/*?*/ } else { y[station]=(minimal(seed)%(passengerlimit[station]+…info[station][ctr3]=(minimal(seed)%(16-station))+station+1; seed=minimal(seed); out[info[station][ctr3… Iterative method - Jacobi - problem with code Programming Software Development by XodoX … of entries in the vector. // // Input/output, int *SEED, a seed for the random number generator. // // Output, double R[N…; i++ ) { k = *seed / 127773; *seed = 16807 * ( *seed - k * 127773 ) - k * 2836; if ( *seed < 0 ) { *seed = *seed + i4_huge; } r[i] = ( double ) ( *seed ) * 4.656612875E-10; } … Hash tables, how do they work? Programming Software Development by Sarkurd …; val, const Types&... args) { hash_combine(seed,val); hash_val(seed,args...); } // auxiliary generic function to create a…hash_val (const Types&... args) { std::size_t seed = 0; hash_val (seed, args...); return seed; } `main.cpp` #include <unordered_set>…