470,614 Members | 1,548 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

randomize(); or random prototype

I was working on the random functions programs and i dont know the prototypes for random and randomize please can some one help me ??
Expand|Select|Wrap|Line Numbers
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<stdio.h>
  4. const int max=3;
  5. void main()
  6. {
  7. randomize();
  8. int number;
  9. number=50+random(max);
  10. for(int p=number;p>=50;p--)
  11. cout<<p<<"#";
  12. cout<<endl;
Function 'randomize' should have a prototype
function 'random'should have a prototype
Nov 4 '15 #1
2 4736
9,208 Expert Mod 8TB
Where did you hear about these functions?

The only ones I know about are rand() for generating a random number and srand() for seeding the random number generator. Both of these functions have prototypes in <stdlib.h>.
Nov 4 '15 #2
2,425 Expert 2GB
By the way, you should change line 5 such that main returns an int.
Nov 4 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by Jeff Thies | last post: by
2 posts views Thread by Kent | last post: by
8 posts views Thread by Locky | last post: by
3 posts views Thread by Army1987 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.