-
Expert Member
Is there srand() in C or C++
Is there something called srand() in C or C++. If so what is the usage of this. Has it got the same functionality as rand().
-
Contributing Member
Re: Is there srand() in C or C++
There is function called as srand() in C which is used to seed the random sequence generated by |rand()|.
-
Contributing Member
Re: Is there srand() in C or C++
To add to this discussion the syntax of srand() is given below
void srand( unsigned seed );
If you use this function srand() then the header file called as stdlib.h has to be included
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules