#include <iostream>
#include "stdio.h"
#include "string.h"
#include <stdlib.h>
#include <vector>

class A {
public:

    std::string tellSomething() {
        std::cout << "A!" << std::endl;
        return "foo";
    }

    ~A() {
        std::cout << "Destructor" << std::endl;
    }
};

int main(int argc, const char *argv[])
{
    std::vector<A *>* v = new std::vector<A *>;

    A *a1 = new A;
    A *a2 = new A;

    a1->tellSomething();

    v->push_back(a1);
    v->push_back(a2);

    delete v;

    a1->tellSomething();

    return 0;
}
