输出这个问题 [英] output of this question

查看:71
本文介绍了输出这个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  int  global =  10 ; 
void func(int& x,inty)
{
x = x-y;
y = x * 10 ;
cout<<< x<< ' ,'<< y<< ; ' \ n';
}
void main()
{
int global = 7 ;
func(:: global,global)
cout<< global<< ' , '<< :: global<< ' \ n';
func(global,:: global);
cout<<< global<< ' ,'<< :: global< ;< ' \ n';
}

解决方案

Quote:

void func(int& x, inty

编译错误。


很多错误是该程序的输出。找你自己, http://cpp.sh/3esj [ ^ ]我不会在代码中列出所有问题。 :)

int global=10;
void func(int&x,inty)
{
x=x-y;
y=x*10;
cout<<x<<','<<y<<'\n';
}
void main()
{
int global=7;
func(::global,global)
cout<<global<<','<<::global<<'\n';
func(global,::global);
cout<<global<<','<<::global<<'\n';
}

解决方案

Quote:

void func(int&x,inty)

Compile error.


A lot of errors is the output of this program. Look for yourself, http://cpp.sh/3esj[^] I would not enlist all of the problems in your code. :)


这篇关于输出这个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆