#include <iostream>
#include <vector>
#include <algorithm>

struct B
{
    int blah;
    void Blah()
    {
        std::cout << blah << std::endl;
    }
};

struct A
{
    B *bp;
    A(B *youmakethewayalittlebetter) : bp(youmakethewayalittlebetter)
    {
    }
    void Meh()
    {
        bp->Blah();
    }
};

int main()
{
    B b {7};
    std::vector<A> av (10, &b);
    std::for_each(av.begin(), av.end(), [](A &a)
    {
        a.Meh();
    });
}
