Саша Ситников (shuffle_c) wrote,
Саша Ситников
shuffle_c

  • Music:

Задача по C++

Есть код.
 
class Scope
{
    struct Base
    {
        ~Base()
        {
            std::cout << "~Base" << std::endl;
        }
    protected:
        Base() { }

    };

    friend struct Local;
};

struct Local
{
    class Derived : public Scope::Base
    {
        Derived() { }
        ~Derived() { }
    };
};

Нужно написать нечто, вызывающее деструктор класса Base.
Subscribe

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 6 comments