I have the follow question
http://img41.imageshack.us/img41/5318/94404328.jpg
can anyone explain the answer to me.
I'm not sure what is correct.
I have the follow question
http://img41.imageshack.us/img41/5318/94404328.jpg
can anyone explain the answer to me.
I'm not sure what is correct.
You have a C++ compiler, do you not? Ask it your question. And/or research the web - the answer is also contained in this site's Tutorial's section.The purpose of these board is not for other people to do your homework for you. Try things out work on your own, homework has a purpose. If you still have trouble with a specific piece of code or concept please feel free to ask. But please do not ask people to do your entire homework for you, it simply annoys people most of the time.
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
Hey, this has nothing to do with my homework. I have an exam tomorrow and these question are from a exam-set from a earlier year. The solutions are not explained, thus my question here. And as you can see im NOT asking for the solution, i am asking for an explaination. If you have a problem with that, dont read my post.
And NO i don't have a c++ compiler. I can't install anything on this machine. However, i am also more interested in the explanation.
Okay, so give the solution and your best shot at an explanation. Maybe your explanation is correct.Originally Posted by lesodk
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Okay. I would think that only the first one is correct, since a pointer to a base class can be assigned to a pointer to a derived class. The subsequent questions are illegal because the field "speed" is protected. However the correct answer is, that only the third assignment is illegal. That is what confuses me.
In my opinion, you are correct, both in solution and reasoning. The "model answer" is wrong. We also have to assume that Boat and Car inherit via virtual inheritance from Transport so as to avoid the diamond inheritance problem.Originally Posted by lesodk
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)