1) you should have a header file and implementation file for each class.
then cross compile them together.
2) parameterized manipulators are just those function like statements
inserted into the iostreams:
cout << setprecision(3) <<2.3445566<<endl;
will output 2.344
This is analogous to the printf("%.3f", 2.3445566) in C
3) Because when you delete an object of a derived class, you want to
invoke the destructor of the derived class rather than that of the parent
class, even if you are deleting the object
through a pointer to the parent class.
4) Return by reference means that you have such declaration:
it prevents the compiler from making a copy of the object you
This is dangerous for local objects because you may have had the
object destroyed on the stack. The most common use of return by
reference is to return *this.
This post has been archived. It cannot be replied.