Hi,
Just a small problem (about taken the previous unsigned value in
a 1D- array and copying it to the current value).
Suppose there's an outer loop over the line shown below, so
unsigned_int_ptr keeps changing, as it is a parameter in the
function called function( &array[i] )....
void function( unsigned *unsigned_int_ptr)
{
...... ...
*unsigned_int_ptr = *(unsigned_int_ptr -
sizeof(*unsigned_int_ptr) );
...... ...
}
Using the debugger I find that:
unsigned_int_ptr = 0x0012fdec
sizeof(*unsigned_int_ptr) = 4
- - - - - - - -
unsigned_int_ptr - sizeof(*unsigned_int_ptr) = 0x0012fddc
Instead of
0x0012fde8, which I want....
How do I get/ why don't I get 0x0012fde8, which must be the
correct value ??? At least this is the value I need for
dereferencing so I get stored the previous value, in the current
position, in the unsigned array....
Best regards / Med venlig hilsen
Martin Jørgensen
--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk