here is the modified code,
void tt(int nCol = 1, double dMean = 3.0)
{
string strLT;
strLT.Format("temp=Poisson(1000, %f)", dMean);
LT_execute(strLT);// create 1000 points with mean = dMean, result in dataset called temp
Worksheet wks = Project.ActiveLayer();
Dataset dtemp("temp");// dataset temp can be accessed in OC like this
Dataset aa(wks,nCol-1);// col(1), col(2) etc as Dataset
aa = dtemp;
LT_execute("del temp");// best to clean up temp dataset
}
CP