Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to transfer data to another class

62 views
Skip to first unread message

fl

unread,
Nov 25, 2014, 1:37:26 AM11/25/14
to
Hi,

I have a question about transferring data from a class to another. Today, I see the following line:

We can use a class object for transferring data to another class.


from a forum. But I do not have a clue on how to get it in C++. Could you explain it to me, especially by an example?


Thanks,

Ian Collins

unread,
Nov 25, 2014, 1:56:11 AM11/25/14
to
Please wrap your lines!

Some context would help.

--
Ian Collins

fl

unread,
Nov 26, 2014, 12:16:12 AM11/26/14
to
Hi,

Sorry, I forgot the wrap problem in my first post.



I have a question about transferring data from a class to another.
Today, I see the following line:

We can use a class object for transferring data to another class.


from a forum. But I do not have a clue on how to get it in C++.
Could you explain it to me, especially by an example?


Thanks,

red floyd

unread,
Nov 26, 2014, 12:50:11 AM11/26/14
to
And once again, you have given insufficient information.
The simple answer is "use the appropriate methods".

A more detailed answer can be found at:

http://www.catb.org/esr/faqs/smart-questions.html

Robert Wessel

unread,
Nov 26, 2014, 1:19:17 AM11/26/14
to
On Tue, 25 Nov 2014 21:15:53 -0800 (PST), fl <rxj...@gmail.com>
wrote:
Well that's for the formatting fix, at least. But Ian also asked for
some context. Your question is pretty hard to decipher as it is.

In general, think of all the method that you might use for getting
data out of an object, and all of the methods for getting data in to
an object, and then do the problem appropriate form of that somewhere.

Really, what are you trying to do?

Öö Tiib

unread,
Nov 26, 2014, 2:13:54 AM11/26/14
to
On Wednesday, 26 November 2014 07:16:12 UTC+2, fl wrote:
> I have a question about transferring data from a class to another.
> Today, I see the following line:
>
> We can use a class object for transferring data to another class.
>
> from a forum. But I do not have a clue on how to get it in C++.
> Could you explain it to me, especially by an example?

Internet is full of forums where lot of sentences are posted.
The sentences usually do not contain much wisdom. It is
hard to tell what the one you posted talks about.

In C++ we call member functions of object's class to inspect
or to modify object's state. Member functions are transferring
data into or out of object.

Osmium

unread,
Nov 26, 2014, 9:40:46 AM11/26/14
to
Are you still working on the problem you posed in July or is this a new
problem? Assuming this is the July problem I doubt if there enough
substance in the thing you are Asking about here to help. Your question in
July was, as I understood it, not how to transfer data but how to do it in a
super low overhead way. Remember that a class is an odd-ball structure.

Doing something and doing it almost perfectly are two quite different
things. If all else fails start a new question with an actual question in
the text of the message.


0 new messages