Hi, I think project is only available in python. When implementing its functionality in C++, the following might be helpful:
#include <dolfin.h>
#include "New.h"
#include "Old.h"
/*
Old.ufl:
element = FiniteElement("Lagrange", triangle, 1)
New.ufl:
V = FiniteElement("Lagrange", triangle, 2)
W = FiniteElement("Lagrange", triangle, 1)
u = TrialFunction(V)
v = TestFunction(V)
f = Coefficient(W)
a = dot(u, v)*dx
L = dot(f, v)*dx
*/
int main()
{
UnitSquareMesh mesh(10, 10);
New::FunctionSpace V(mesh);
Old::FunctionSpace W(mesh);
Function u(V);
Function f(W);
New::BilinearForm a(V, V);
New::LinearForm L(V);
L.f = f;
solve(a == L, u);
return 0;
}