On Sep 14, 5:53 pm, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
> Lamefif wrote:
> > [..]
> > pardon my ignorance.
>
> No problem at all (although I suspect that you're being sarcastic).
Not at all
>
> > a char memory cell would be the address and 8 bit char value, and we
> > have 8 of these.
>
> A memory cell is not the address. It _has_ an address.
>
> > you are saying that Data4 holds all 8 cells.
>
> Yes. The type of 'Data4' is "an array of 8 chars". That means that
> 'Data4' designates the area in memory that consists of 8 memory blocks,
> each contains 1 char (byte). 'Data4' is a variable name, no less but
> no more.
>
> > how is this done?
>
> How what is done? How 8 consecutive memory blocks are allocated? How
> one variable can be used to identify a whole bunch of memory blocks
> stringed together? That's just the C++ magic, man.
yes that the magic, how one variable can be used to identify a bunch
of memory blocks?
>
> > is the computer putting aside a chunk made up of 8 cells and assigning
> > to this collective a single address (Data4)?
>
> Here you go, using the "a" word again... 'Data4' is an item in your
> source code. If you ask for its address, the address of the first
> element in the array (the type of 'Data4') is given (and, yes, all
> other 7 elements follow the first one closely).
exactly it cant possibly know where the next char is, apart form the
fact that they are next to each other and we can increment.
is only aware of the first element, the one is pointing to ?
>
> > i mean these are 8 separate bytes each with they're own address right,
>
> Right.
>
> > you cannot bug em up
>
> I don't know what that means.
sorry i meant bag em up
>
> > i would appreciate a bit more then "It needs a careful consideration
> > to be understood"
>
> I meant the fact that 'Data4' _name_ used in an expression is converted
> to a pointer requires some understanding. I did not mean the allocation
> of the characters in the memory or the addressing methods used by the
> compiler.
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask