+=+=+=+=+...........some C++ help needed...........+=+=+=+=+

heat23

Elite Member
Oct 9, 1999
3,998
9
81
www.heatware.com
Heres a link to the question Problem # 3

i have no idea about this....the teacher already assumes we are c++ fiends...but i know nothing about it....ive read half of one of thise giant c++ reference guides...it doesnt mention anything about memory.....our textbook for our class is just an Algorithm book..so thers nothing in there...
any help would be appreciated


thanks
 

slipperyslope

Banned
Oct 10, 1999
1,622
0
0

Point P
|
|
V
-----------------
| m_x 1 |
| m_y 2 |
------------------



Circle C
|
|
V
-------------
| m_x 3 |
| m_y 4 |
| m_r 6 |
-------------


That is the best I can do.....on a message board

Jim
 

thaRealest

Banned
Aug 10, 2001
227
0
0
speaking of C++, i really need it by tomorrow for my programming class. I just started Advanced C++, and my first homework is to be done in C++. Does anyone know where I can possibly "obtain" Borland C++? Much appreciated, thanks.
 

bleeb

Lifer
Feb 3, 2000
10,868
0
0
Install Linux and use their compiler.

Also you need to comment or describe how the variables p, c are represented in memory. Comment on the implications this has to implementing multiple inheritance.

Basically since "C" inherits all the properties of "P," it can also be considered a point. However, the point cannot be considered a circle because it does not contain the memory needed by the circle. Essentially, the internal data representations, assuming a 32-bit architecture, consists of a certain number of memory blocks which the compiler decides for the point. And the circle consists of the same number of memory blocks as the point, with additional memory blocks needed to represent the other data members and methods of the class Circle.

So the way this effects implementing multple inheritance is that at each higher level of inheritance you have greater amounts of memory that are allocated, including the required amount of memory for the lower class. Also, you can consider all higher inheritance classes equal to their lower classes but not the other way around. I think.



NOTE: If I'm completely wrong and what I just said is completely bogus, then please change or add additional comments. Thanks!

Edited: My thoughts got mixed up with my typing so I wrote something wrong. Corrected it.
 

heat23

Elite Member
Oct 9, 1999
3,998
9
81
www.heatware.com
hey thanks for the replies...
please correct me if im wrong....

a copy of the base class Point is maintaned in the derived class Circle, so basically, everyting in Point is also in Circle....therefore creating 2 copies of 'p' and one of 'c'
for implications....it takes up extra memory.....
 

bleeb

Lifer
Feb 3, 2000
10,868
0
0
Not just taking up additional memory but also the way you structure your solutions based on these classes.

Things that are effected are parameter passing, comparisons (you will probably have to use overload operators), assignments(overload operator =), etc.

NOTE: For all the other programmers, please add additional implications.
 

bigshooter

Platinum Member
Oct 12, 1999
2,157
0
71
Don't you guys have a standard compiler that everyone needs to use, or at elast a unix box to telnet into? We all log into a server to turn in our programs and it uses that standard g++ compiler. If you compile your programs on different compilers (i.e. Microsoft) you may get away with errors that you wouldn't on others.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |