#include <iostream>
#include <functional>
#include <vector>
#include <algorithm>
#include <iterator>

using namespace std;
using namespace std::placeholders;

class CPrueba
{
public:
    CPrueba(int x, int y):m_X(x), m_Y(y){ }
    int X()const {return m_X;}
    int Y()const {return m_Y;}
private:
    int m_X;
    int m_Y;
};

class ITest
{
public:
    virtual CPrueba Prueba(double p, double d = 0)const = 0;
};

class CTest : public ITest
{
public:
    CTest(){}

    CPrueba Prueba(double p, double d = 0)const{ return CPrueba(p, d); }
};

void foo( const ITest& test)
{
    std::vector<double> v;
    v.push_back(10.0);
    v.push_back(20.0);
    v.push_back(30.0);
    v.push_back(40.0);

    std::vector<CPrueba> vRes;

    std::transform(v.begin(), v.end(), back_inserter(vRes), bind(&ITest::Prueba, ref(test), _1, 0));

    for(std::vector<CPrueba>::const_iterator it = vRes.begin(); it != vRes.end(); ++it)
    {
        cout << it->X() << "," << it->Y()<<endl;
    }
}

int main() {
    CTest test;

    foo(test);
    return 0;
}