having trouble with the intro to dynamic memory allocation

i keep getting the error invalid conversion from unsigned int* to unsigned int... im not sure how to use dynamic memory allocation after tutorial so a little guidance can be cools :3 .


istream& operator>>(istream &in, two2SmartArray &list)
{
smartArray *rowPtr;
unsigned int row,col;
string junk;


if(&in == &cin)
{
cout<<"Array size:Enter row and column ";
in>>row>>col;

}
else
in>>junk>>junk>>row>>col;

list.nukem();
list.row = new unsigned int[list.row = row];
list.col = new unsigned int[list.col = col];

for(unsigned int i = 0; i < row; ++i)
{
for(unsigned int j = 0;j<col; ++j)
{
if(&in == &cin)
cout << "list["<<i<<"]["<<j<<"] = ";
in >> list[i][j];
}
return in;
list.nukem();
}
}
Topic archived. No new replies allowed.