472,951 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

food for thoughts

Hi

1] can anyone tell me if i inherited a BASE class (with int and float
as data members)
then does that count into size of obj of derived class.
2] can i perform a operations like adding 2 obj and storing it's sum
into 3 rd one of type struct in c++. to my knowledge it's ans is NO.
but cn i use operator overloading to do this?

i havn't tried it, but if anyone has ans ,pls contact me.

bye,hav a GOOD DAY.

Feb 26 '06 #1
1 1404
On 26 Feb 2006 09:51:35 -0800, "amruta" <am******@gmail.com> wrote:
Hi

1] can anyone tell me if i inherited a BASE class (with int and float
as data members)
then does that count into size of obj of derived class.
Yes, of course.
2] can i perform a operations like adding 2 obj and storing it's sum
into 3 rd one of type struct in c++. to my knowledge it's ans is NO.
but cn i use operator overloading to do this?
It depends on how the objects are defined. But yes, you can definitely
overload operator+ for user-defined types. Obviously, the result of
adding two objects of a user-defined type should usually be the same
type, although one could overload the operator to return something
entirely different.
i havn't tried it, but if anyone has ans ,pls contact me.

bye,hav a GOOD DAY.


--
Bob Hairgrove
No**********@Home.com
Feb 26 '06 #2

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

Similar topics

5
by: Laura Creighton | last post by:
I thought that the food provided at PyCon last year was awful. Now I find out it cost us approximately half the budget of PyCon, at 74$ a head. I think that this is shameful. But Aahz thinks the...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
4
by: news.hku.hk | last post by:
I would like to group different kinds of food. There are unknown number of kinds of food e.g. apple, orange, lemon, melon, ......... of course it's only a finite number but i don't know. also...
3
by: Ron Guerin | last post by:
The New York Linux User's Group invites you to a special presentation by Alex Martelli of Google, on the Python Object Model. This presentation will be held at P.J. Clarke's Sidecar, rather than...
0
by: Kelly | last post by:
Hi! I wanted to invite you to visit my website, DietFacts.com. This project started 10 years ago when my father was diagnosed with diabetes. He really enjoys dining out with family and friends but...
0
by: raja | last post by:
Improve food production efficiency, latest scientific info A new journal for the food industry http://food-drinks.page.tl/
0
by: raja | last post by:
Food & Drink Gifts Search creative and unique gifts at Surprise.com. http://food-drinks.page.tl/
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.