[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
Base Address
Base Address
A starting address for a block of data. When a set of items of data is stored in the memory of a computer it is often convenient to keep the data in order and store it in a set of consecutive addresses. When this is done the first of these addresses is known as the base address because any other address can be found by adding to or subtracting from this number.

C, C++ arrays

An array is a typical 'block of data'. In C++, the base address of an array is the adress of the first element (at index zero).
//Create an array
int array[10];
//Get base address
int* baseAddress1 = &array[0];
//Equivalent to get the base address
int* baseAddress2 = array;


last edited (August 5, 2005) by bilderbikkel, Number of views: 1755, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.