答复 [英] Reply

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

问题描述

您好,

您可以声明一个类而不是该函数,并且它可以拥有数据

成员,因为你传递给函数u的参数

指定。这些数据成员是私有的,而这个函数是

public .Its构造函数将接受

所取的那些参数你的函数。


示例:

class Recur {

private:

double a;

双b;

双重资金;

公开:

重复(双a1,双b1){

a = a1; b = b1;

}


double recur_func(){

Recur x1(a + b / 2,b + a / 2),//做点什么

x2(a * b /(a + b),2 * a * b /(a + b));

res = x1.recur_func()+ x2.recur_func();

返回res;

}

};

in main


main()

{

Recur s(21.0,51.0);

cout<< s.recur_func();

}

我想那会...... ....

再见..

Hello,
U could declare a class instead of the function and it can have data
members as that of the arguments u pass to the function u''ve
specified.And those data members are private while this function is
public .Its constructor will take those arguments which were taken by
your function.

Example:
class Recur{
private:
double a;
double b;
double res;
public :
Recur(double a1,double b1){
a=a1;b=b1;
}

double recur_func(){
Recur x1( a+b/2 , b+a/2 ),//Does something
x2( a*b/(a+b) , 2*a*b/(a+b) );
res = x1.recur_func() + x2.recur_func();
return res;
}
};
in main

main()
{
Recur s(21.0,51.0);
cout<<s.recur_func();
}
I think that''ll do....
Bye..

推荐答案

Ramesh< ra ***** *******@gmail.com>写道:


Ramesh,你是否可以如此友好地在询问

问题的帖子中发帖回复?用一个不同的

(而且相当无意义)的标题开始一个新的主题,这使你很难确定你所回复的内容。
Ramesh <ra************@gmail.com> wrote:

Ramesh, could you be so kind to post your reply in the thread the
question was asked in? Starting a new thread with a different
(and rather meaningless) title makes it extremely hard to figure
out what you are replying to.
U可以声明一个类而不是函数,它可以将数据作为参数的成员传递给你指定的函数。这些数据成员是私有的这个函数是公共的。它的构造函数会接受你的函数所带的那些参数。
U could declare a class instead of the function and it can have data
members as that of the arguments u pass to the function u''ve
specified.And those data members are private while this function is
public .Its constructor will take those arguments which were taken by
your function.




就在这里停止。那是'C ++。我们在这里做C语言,这是一种不同的语言,而且没有课程。


BTW,你写的你是通常用英文写成''你'。

如果你能坚持使用传统的拼写方式,那么你的帖子就会更容易阅读像我这样的第一个

语言不是英语。

问候,Jens

-

\ Jens Thoms Toerring ___ Je***********@physik.fu- berlin.de

\ __________________________ http:// www。 toerring.de


Ramesh写道:

你可以声明一个类而不是函数,它可以有数据
成员作为参数的成员u传递给你指定的函数。这些数据成员是私有的,而这个函数是公共的。它的构造函数将采用你的函数所采用的那些参数。

U could declare a class instead of the function and it can have data
members as that of the arguments u pass to the function u''ve
specified.And those data members are private while this function is
public .Its constructor will take those arguments which were taken by
your function.




你在这里有几个明显的错误。首先,C没有课程,

也没有私人或公共职能。它也没有

构造函数。因此,你离主题太远了。


另外你有拼写错误的你,你已经,并且误导了

你的句子,

终端后应该至少有一个空白。'''。这对读者来说非常烦人,让你看起来没有受过教育。


第三,你没有引用你所回复的任何内容,所以

没人知道问题是什么。我怀疑你

另外还开了一个新线程。


-

查克F(cb ***** ***@yahoo.com)(cb********@worldnet.att.net)

可用于咨询/临时嵌入式和系统。

< HTTP://cbfalconer.home.att.net>使用worldnet地址!



You have several glaring mistakes here. First, C has no classes,
nor private nor public functions. Neither does it have
constructors. Thus you are far off-topic.

In addition you have misspelled "you", "you''ve", and mispunctuated
your sentences, which should have at least one blank after a
terminal ''.''. This is highly annoying to the reader and makes you
appear uneducated.

Thirdly, you have failed to quote whatever you are replying to, so
nobody has the slightest idea what the problem is. I suspect you
have started a new thread in addition.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


Je *********** @ physik.fu-berlin.de 写道:
Je***********@physik.fu-berlin.de wrote:
Ramesh< ra ****** ******@gmail.com>写道:

Ramesh,你可以如此友善地在回答问题的帖子中发帖回复吗?用一个不同的
(而且没有意义的)标题开始一个新的主题,很难确定你要回复的内容。
Ramesh <ra************@gmail.com> wrote:

Ramesh, could you be so kind to post your reply in the thread the
question was asked in? Starting a new thread with a different
(and rather meaningless) title makes it extremely hard to figure
out what you are replying to.



他是使用braindead google发布系统,对

主题的任何更改都会启动一个新主题。


Brian Rodenborn


He''s using the braindead google posting system, where any change to the
subject starts a new thread.

Brian Rodenborn


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

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