主题:菜鸟问题,请解答
本人刚刚开始接触VC++
学习时编译一下一段代码,但是编译的时候总是提示在第6行有错误,本人水平很有限,希望得到高人解答,谢谢
代码如下
1: #include <iostream.h>
2: #include <conio.h>
3: #pragma hdrstop
4:
5: int multiply(int,int)
[color=800000]6: void showResult(int); [/color]
7:
8:int main(int argc,char **argv);
9:{
10: int x,y,result;
11: cout << end1 << "Enter the first value:";
12: cin >> x;
13: cout << "Enter the second value: ";
14: cin >> y;
15: result=multiply(x,y);
16: showResult(result);
17: cout << end1 << end1 << "Press any key to continue...";
18: getch();
19: return 0
20: }
21:
22: int multiply(int x,int y)
23: {
24:return x * y;
25: }
26:
27: void showResult(int res)
28: {
29:cout << "The result is: " << res <<end1;
30: }
学习时编译一下一段代码,但是编译的时候总是提示在第6行有错误,本人水平很有限,希望得到高人解答,谢谢
代码如下
1: #include <iostream.h>
2: #include <conio.h>
3: #pragma hdrstop
4:
5: int multiply(int,int)
[color=800000]6: void showResult(int); [/color]
7:
8:int main(int argc,char **argv);
9:{
10: int x,y,result;
11: cout << end1 << "Enter the first value:";
12: cin >> x;
13: cout << "Enter the second value: ";
14: cin >> y;
15: result=multiply(x,y);
16: showResult(result);
17: cout << end1 << end1 << "Press any key to continue...";
18: getch();
19: return 0
20: }
21:
22: int multiply(int x,int y)
23: {
24:return x * y;
25: }
26:
27: void showResult(int res)
28: {
29:cout << "The result is: " << res <<end1;
30: }