473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

randomize(); or random prototype

Hi,
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;
  13.  
errors
Function 'randomize' should have a prototype
function 'random'should have a prototype
Nov 4 '15 #1
2 5104
weaknessforcats
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
donbock
2,426 Expert 2GB
By the way, you should change line 5 such that main returns an int.
Nov 4 '15 #3

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

Similar topics

14
by: Miranda | last post by:
Hi, I have a ASP/vbscript program that generates random passwords. The problem is I need to insert those passwords into an Access database of 327 clients. I have the random password program...
21
by: Jeff Thies | last post by:
I'd like to randomly sort an array. A good method?
2
by: Kent | last post by:
What am I missing here. Why doesn't this produce a random string. It is kind of random. <% Const ConstantLower = "bcdfghjklmnpqrstvwxyz" Const VowelLower = "aeiou" Const Numbers = "0123456789"...
8
by: Locky | last post by:
Sorry if this is a repost - my connection went as I was posting the 1st time! I want to insert a random number, in mod 10, in a field, based on whether another field is empty or not. I am...
2
by: Rich | last post by:
Here is what I am trying for randomizing 2 numbers in the same subroutine so that they are not equal to each other: Dim j As Integer, k As Integer j = New System.Random().Next(0, 10) k = New...
3
by: Army1987 | last post by:
Is there anything wrong with this program? It seems to behave strangely if I give stdin EOF when asked for the character set... /* BEGIN pwdgen.c */ #include <stdio.h> #include "random.h"...
1
by: Radu | last post by:
As simple-to-remember-but-unique confirmation numbers, I need to generate six random characters (ASCII 65 to 90, inclusive): Randomize() objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) +...
11
by: Masud | last post by:
hi, for a test i want to generate different random numbers between different ranges in a single loop. I tried to solve in the following way but it always profile same value. I am looking for...
5
by: gggram2000 | last post by:
Hi, I'ved spent two full days trying to find a solution, I can randomize numbers between two ranges and it works fine, But my problem is when i want to randomize five numbers that I got. eg. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.