[Dev-C++] Please help with program bugs, i tried, no luck.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: tayo o. <ta...@ya...> - 2001-01-18 15:02:34
|
Intranet Compilers
Compilation Results
1 #include <iostream.h>
2 #include <stdlib.h>
3
4 int dice_1;
5 int dice_2;
6 int roll()
7 {
8 randomize();
9 dice_1 = random(6) + 1;
10 dice_2 = random(6) + 1;
11 return dice_1;
12 return dice_2;
13 }
14 int die1()
15 {
16 return dice_1;
17 }
18 int dice_2()
19 {
20 return dice_2;
21 }
22 int main()
23 {
24 cout<<" the value rolled is : "<<roll()<<endl;
25 cout <<" the first die was : "<<die1()<<endl;
26 cout<<" the second die was:"<<die2()<<endl;
27 return 0;
28 }
language: C and C++
options: Display all warnings
options: Include math library during linking
prog.cpp: In function `int roll()':
prog.cpp:8: implicit declaration of function `int
randomize(...)'
c:/djgpp/include/stdlib.h:121: too many arguments to
function `long int random()'
prog.cpp:9: at this point in file
c:/djgpp/include/stdlib.h:121: too many arguments to
function `long int random()'
prog.cpp:10: at this point in file
prog.cpp: In function `int dice_2()':
prog.cpp:5: previous non-function declaration `int
dice_2'
prog.cpp:19: conflicts with function declaration
`int dice_2()'
prog.cpp: In function `int main()':
prog.cpp:26: implicit declaration of function `int
die2(...)'
Errors Found!
You need to correct the errors so that the program
compiles. The compiler was executed remotely from
MarketCache1.netcarrier.net/209.140.169.18 on
Thursday, January 18, 101, 8:51.
Send comments to:ole...@ie....
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|