Hi,
IntegrationResult is a structure that holds results such as peak area, position etc. It does not contain the resulting curve at each x value. Also it cannot be just printed directly using a print statement.
You can use code such as below, which is very similar to what is in the help file:
Easwar
OriginLab
void test_integ()
{
// Point to currently active worksheet
Worksheet wks = Project.ActiveLayer();
if( !wks ) return;
// Take first two cols and use for data curve
Curve crvData(wks, 0 , 1);
// Use 3rd to place Y for output curve
Dataset dsResultCurve(wks, 2);
if( !crvData || !dsResultCurve ) return;
// Set output col length same as input curve length
dsResultCurve.SetSize(crvData.GetSize());
// Declare structure to hold integration result and call function to integrate
IntegrationResult irResult;
bool bRet = Curve_integrate(&crvData, &irResult, NULL, &dsResultCurve);
if( !bRet ) printf("error!");
// Integrated curve will be in 3rd col
// To see result values such as area, can do the following:
Tree trResult;
trResult = irResult;
out_tree(trResult);
}