473,324 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Reply

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..
Nov 14 '05 #1
10 1471
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 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.


Stop right here. That's C++. We do C here, which is a different
language and doesn't has classes.

BTW, what you write as 'u' is normally written as 'you' in English.
If you could stick to the conventional way of spelling it would make
your posts quite a bit easier to read for people like me whose first
language isn't English.
Regards, Jens
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #2
Ramesh wrote:

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.


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!

Nov 14 '05 #3
Je***********@physik.fu-berlin.de wrote:
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.

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

Brian Rodenborn
Nov 14 '05 #4
Default User wrote:
Je***********@physik.fu-berlin.de wrote:

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.


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

Brian Rodenborn


Surely, a change is subject is the definition of a new thread. ?
--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 14 '05 #5

On Mon, 4 Oct 2004, Joe Wright wrote:

Default User wrote:
Je***********@physik.fu-berlin.de 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.


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


Surely, a change is subject is the definition of a new thread. ?


No; Usenet threads can branch and mutate. Remember, a "thread" is
not just a subject line: it's a history of referenced posts. At the
most basic level, if a post is a reply to a previous post to the same
newsgroup, and quotes that previous post, then the two posts ought to
be considered part of the same thread regardless of subject line.

(As an example, consider this post, which will be treated as a separate
thread by Google Groups because of the added [OT] tag in the subject line,
even though it's clearly a response to your post.)

Google's threading is broken (ironically, you can use Google to find
lots and lots of posts commenting on this fact), and I don't recall ever
seeing a good explanation for why it's so broken. The References headers
are right there in the message; it's not like Google /couldn't/ link
threads together properly. They just don't want to.

HTH,
-Arthur
Nov 14 '05 #6
"Joe Wright" <jo********@comcast.net> wrote in message
news:MJ********************@comcast.com...
Brian Rodenborn


Surely, a change is subject is the definition of a new thread. ?


No it's not, not in Usenet anyway.

-Mike
Nov 14 '05 #7
Joe Wright wrote:
Default User wrote:
He's using the braindead google posting system, where any change to
the subject starts a new thread.

Surely, a change is subject is the definition of a new thread. ?


Not at all. Even something as simple as correcting a typo or adding
[OT] to a subject line starts a new thread in google. They also glomm
together unrelated threads that happen to have the same subject.

I appreciate the job the Google people did in rescuing the archives
when Deja was going under, but the newsreading system isn't good. I
haven't looked at their Beta system, some of these problems may be
corrected there.

All in all, I recommend getting a real newsreader and news provider.
http://news.individual.net is available for free for those with no
other news source.


Brian Rodenborn

Nov 14 '05 #8
Joe Wright <jo********@comcast.net> wrote in message news:<MJ********************@comcast.com>...

Surely, a change is subject is the definition of a new thread. ?


No, the absence of a "References: " header on the posting is the
definition of a new thread.
Nov 14 '05 #9
jj*@bcs.org.uk (J. J. Farrell) writes:
Joe Wright <jo********@comcast.net> wrote in message
news:<MJ********************@comcast.com>...

Surely, a change is subject is the definition of a new thread. ?


No, the absence of a "References: " header on the posting is the
definition of a new thread.


Yes, but not all software handles this properly.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #10
Keith Thompson <ks***@mib.org> wrote:
jj*@bcs.org.uk (J. J. Farrell) writes:
Joe Wright <jo********@comcast.net> wrote in message
news:<MJ********************@comcast.com>...

Surely, a change is subject is the definition of a new thread. ?


No, the absence of a "References: " header on the posting is the
definition of a new thread.


Yes, but not all software handles this properly.


*Shrug* Whose problem is that?

Richard
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Khamal | last post by:
Hello... The quality of reply is quite bad in this forum.....many post has not reply.... I/We need Microsoft technical team involve directly in this forum and put some effort to give us HELP. If...
2
by: Andrew Robinson | last post by:
I need to make a web service call using an HTTPS POST. XML data is returned in the body of the HTTPS reply. What is the best way to do this with asp.net web services? I am very comfortable in...
6
by: A.Translator | last post by:
As I am just beginning to learn php I had to fish a free form script from the web. The script works fine, it processes the data filled in, including the sender's email address and sends an email to...
0
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
3
by: vinodkus | last post by:
Please tell me how can I reply to newsgroup for quicker response
2
by: =?Utf-8?B?VHJvb2RsZXM=?= | last post by:
I had an email from someone who, at the time, was not in my address book. I clicked 'reply' and wrote my response. As I had clicked reply I didn't have to type in the email address separately. The...
1
by: kang jia | last post by:
Hi! I tried creating a forum manually using PHP and succeeded in posting topics and creating new topics, the new topics can be inserted into database, but cant retrieve from database and display this...
3
by: kang jia | last post by:
hi i am doing reply page for forum, users can reply for the specific topic they would like to reply. Firstly of all, when click the topic name in topic page. i will redirect them to reply page....
5
helimeef
by: helimeef | last post by:
I designed a little PHP/MySQL forum (just for fun), and I have commenting set up and top threads on the homepage and whatnot. I'm relatively new to PHP, and this is the biggest project I've done, but...
1
by: stef mientki | last post by:
hello, I'm always have great difficulties, replying to this beautiful and helpful list. When I hit the reply button, the message is sent personally to the sender and not to the list. I've...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.