hi!

i have a function to read integers from text file and put them respectively in an array. But... the result is not doing that....instead of that it store the last integer from text file as all elements of the array.... i wonder why...can somebody help me with this? Thanks

void Tau::readFile()
{
int arr=0;
ifstream inClientFile("data3.txt");
N=ReadNValue();
int n=readNumVar();

while (inClientFile>>arr)
{
for (int i=0;i<N;++i)
{
for (int j=0;j<n;++j)
{
Buff[i][j]=arr;
}
}
}
}