|
-
January 3rd, 2006, 12:47 PM
#1
me not understanding pointer's
// call function
BYTE *pData;
Func( pData );
// pData no null.
// Function
Func( BYTE *pData )
{
pData = new BYTE[some_data_length];
memcpy( pData, some_data, some_data_length );
}
Why after the function returns is pData nullified?
The pointer is passed in fine, and the memory is allocated OK.
I know its elementary, but I seem to missing something obvious...
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|