How to use c++ create MaterialExpression(CreateNewMaterialExpression)

You can create a new Material Expression in c++ like this:

UMaterialExpression* Expression = CreateNewMaterialExpression(UMaterialExpressionFunctionOutput::StaticClass(), FVector2D(200, 300), false, true);

Hope that helps =)