delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/20:17:10

Message-ID: <33123B5C.6605@epix.net>
Date: Mon, 24 Feb 1997 20:07:40 -0500
From: "Mr. Cup O. Slaw" <coleslaw AT epix DOT net>
Reply-To: coleslaw AT epix DOT net
Organization: P & T Inc.
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Error??

I have two programs that use the function radomize(); which I use to
later represent a dice roll of three six sided dice. Example:

roll= (random(6)+1) + (random(6)+1) + (random(6)+1);

	These compile and run fine under C++v1.0 and TurboC++4.5 but when I try
to compile them under djgpp I get the folloeing errors.

c:/djgpp/include/stdlib.h:101: too many arguments to funtion 'long int
random()

	Ive tried compiling it using:
	gcc myfile.cpp -0 myfile.exe -lm
	gcc myfile.cpp
	gxx myfile.cpp -o myfile.exe -lm
	gxx myfile.cpp
	gxx myfile.cpp -pg
	gxx myfile.cpp -v
and a few others I can't quite remember. Any help would be greatly
appreciated. And please excuse my lack of knowledge if the answer is an
obvious one. Thanks.

P.S. I have ver. 2.01

COLESLAW

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019