Date: Tue, 25 Feb 1997 10:13:01 +0100 (MET) From: Miguel Murillo To: "Mr. Cup O. Slaw" cc: djgpp AT delorie DOT com Subject: Re: Error?? In-Reply-To: <33123B5C.6605@epix.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 24 Feb 1997, Mr. Cup O. Slaw wrote: > I have two programs that use the function ra domize(); 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); #include long int random(void); rand() ---> number (0...RAND_MAX) RAND_MAX = defined number in math.h or stdlib.h #include int rand(void); rand() ---> number (0...RAND_MAX) RAND_MAX = defined number in math.h or stdlib.h rand()===random() randomize(); It's a macro for initialize seek; ^ > > 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 >