I\'ve a question about initialization of inherited members in constructor of derived class. Example code:
I am taking a quadratic expression, where y=ax^2 + bx + c with a,b,c are constants and x is a variable. Here is my class:
I have a class that looks like: class Foo { public: Foo(); virtual ~Foo(); private: Odp* bar; }; I wish t开发者_Go百科o initialize bar to NULL. Is this the best way to do it?
Toward the end of Chapter 16 of the \"C++ Primer\" I encountered the following code (I\'ve removed a bunch of lines):
I have always been a good boy when writing my classes, prefixing all member variables with m_: class Test {
This question already has answers here: Catching exceptions from a constructor's initializer list 开发者_StackOverflow(5 answers)
Is it possible to use the initialization list of a child class\' constructor to initialize data members declared as protected in the parent class?I can\'t get it to work.I can work around it, but it w