- Nested classes = classes imbriquées
- Exceptions
class cat
{
class paw
}
cat::paw instance;
Exceptions :
class GradeTooHighException : public std::exception
{
public:
virtual const char *what() const throw()
{
return ("Bureaucrat::exception : Grade is too high");
}
};
try
{
if (grade > max)
throw GradeTooHighException() ;
}
catch (std::exception &e)
{
cout << e.what() << endl;
}