devxlogo

Tip Bank

Exception Type Match

When an exception is thrown, the exception handling mechanism searches for a matching handler for it. The matching rules for exceptions are more restrictive than the matching rules for function

Overloaded Operators May Not Have Default Parameters

Unlike ordinary functions, overloaded operators cannot declare a parameter with a default value (overloaded operator() is the only exception): class Date{ private: int day, month, year; public: Date & operator

Including Boilerplate Text

If you have header or footer material which appears on every page in your site, such as navigation or copyright information, it makes sense to store it centrally and use

Qualifying an Element of Priority Queue

The Standard Template Library defines a specialized form of the queue container called priority_queue. A priority_queue is a queue whose elements are internally sorted according to their priority. Thus, an