devxlogo

March 19, 2000

Using the Assert Macro

Question: I am not sure if it is good when I use the assert macro in the following code: int sum(int number)// Precondition: number => 1// Postcondition: return sum from

Defining an Array of Strings

Question: I have 20 predefined strings that I want to put into an array of strings. Here is my idea: #include static std::string array[20]; If I do just this, I

Object Containment and Member Initialization

Question: I would like to know for containment (having objects as data member), what is meant by “if the inner class object’s constructor requires parameters, the initialization syntax must be