Hi..
I have tried to reset my pointer, but when I check it does not go back to the original address. I have tried at so many places but it always points to the next address whereby there is no data inside. Could someone explain. Thanks! the code I've been working on is as below..
[CODE=cpp]for (p=k+1; p<row; p++)
{
char (*bptr)[5] = anothers;
anothers = anothers + n;
bptr = anothers;
for (j=0; j<column; j++)
{
outb = (*bptr)[j];
cout << outb;
if ((j+1)%5 == 0)
cout << endl;
}
cout << endl;
cout << '\t' << u << '\t';
for (j=0; j<column; j++)
{
char (*cptr)[5] = coll;
if ((*aptr)[j] != (*bptr)[j])
{
(*cptr)[j] = '0';
}
else
{
(*cptr)[j] = (*aptr)[j];
}
outc = (*cptr)[j];
cout << outc ;
}
cout << endl;
}
cout << "Pointer... :" << bptr << endl;
}
bptr = anothers;[/CODE]
I have tried to reset my pointer, but when I check it does not go back to the original address. I have tried at so many places but it always points to the next address whereby there is no data inside. Could someone explain. Thanks! the code I've been working on is as below..
[CODE=cpp]for (p=k+1; p<row; p++)
{
char (*bptr)[5] = anothers;
anothers = anothers + n;
bptr = anothers;
for (j=0; j<column; j++)
{
outb = (*bptr)[j];
cout << outb;
if ((j+1)%5 == 0)
cout << endl;
}
cout << endl;
cout << '\t' << u << '\t';
for (j=0; j<column; j++)
{
char (*cptr)[5] = coll;
if ((*aptr)[j] != (*bptr)[j])
{
(*cptr)[j] = '0';
}
else
{
(*cptr)[j] = (*aptr)[j];
}
outc = (*cptr)[j];
cout << outc ;
}
cout << endl;
}
cout << "Pointer... :" << bptr << endl;
}
bptr = anothers;[/CODE]
Comment