No output please help


#1

The problem with this code is its not generating output, although its populating final vector with values.

vector Solution::getRow(int A)
{
int i,j,sum;
vector<vector>result(A);
for(i=0;i<A+1;i++)
{
result[i]=vector(i+1,0);
}
for(i=0;i<A+1;i++)
{
for(j=0;j<result[i].size();j++)
{
if(j==0||j==result[i].size()-1)
{
result[i][j]=1;
}
else
{
result[i][j]=result[i-1][j]+result[i-1][j-1];
}
}
}
vectorfinal;
for(i=0;i<A+1;i++)
{
if(i==A)
{
//cout<<“IN”<<endl;
for(j=0;j<result[i].size();j++)
{
//cout<<“Loop=”<<result[i][j]<<endl;
final.push_back(result[i][j]);
}
}
}
/*cout<<“size=”<<final.size()<<endl;

return final;

}