编译没有通过 请问错在哪儿里
来源:2-13 编程练习
broodopq
2018-10-31 18:10:53
#include<iostream>
using namespace std;
//定义功能实现函数,注意要使用引用传递参数
jisuan(int &a,int &b,int &jia,int &jian,int &cheng,int &chu)
{
//int count(在此填入需要传递的参数){
{
if(!a||!b) return 1;
//运算并赋值
a+b=jia;
return 0;
}
int main()
{
int a=12,b=3;
int &ra=a;
int &rb=b;
//定义存放和差积商的四个变量
int jia,jian,cheng,chu;
int &jia=jia;
int &jian=jian;
int &cheng=cheng;
int &chu=chu;
//调用函数,并做判断输出
jisuan(a,b);
return 0;
}
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
C:\C++\test\Cpp1.cpp(13) : error C2143: syntax error : missing ';' before '+'
C:\C++\test\Cpp1.cpp(19) : error C2601: 'main' : local function definitions are illegal
C:\C++\test\Cpp1.cpp(34) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
Cpp1.exe - 1 error(s), 0 warning(s)
1回答
好帮手慕查理
2018-10-31
您好,请查看http://class.imooc.com/course/qadetail/74800 。祝学习愉快!
相似问题