come'on in

numnum (numnum)
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:
int& myfunc(){...}
it prevents the compiler from making a copy of the object you
have returned.
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.
2001-6-19 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: could anyone help me on C++ question?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论