I think your printing loop is incorrect, try doing this :
list<nonZero>::iterator j;
list< list<nonZero> >::iterator i;
for(i = rows.begin(); i != rows.end(); i++)
{
for(j = i->begin();j != i->end(); j++)
{
cout<<(*j).getColumn()<<" "<<(*j).getValue()<<" ";
}
cout<<endl;
}
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608