Quote:
|
Originally Posted by redhead
Give me some time, and I'll get back to this one.. Just havn't come up with a simple example yet..
|
a global function that will validate pointers (based on a range [m,n] of memory addresses) for newly added code. Several other functions will call this global function, and if the value is bad, i want to do an assert.
so something like:
void myAssert( pointerType p1)
{
// check for valid memory address
if ( (p1 < m) || (p1 > n ) )
assert1(true); // do an assert if pointer is not in valid range
else
assert1(false);
}
i get all confused with * and & when it has to do with memory addresses, but that's basically the jist of it.
