[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] gets strengen



> > "As we have seen, when we declare an array, a contiguous block of memory is allocated for the
> > cells of the array and a pointer cell (of the appropriate type) is also allocated and
> initialized
> > to point to the first cell of the array. This pointer cell is given the name of the array.
> When
> 
> Ovenstående er noget vrøvl. Der bliver altså ikke allokeret en pointer
> når du allokerer en array i nogle compilere jeg kender.
> 
> Her er et faktisk eksempel:

Okay, jeg kan desværre ikke forstå assembler, en lille ting jeg længe har ville lære men ikke haft
tid til;)

Men, buf er jo adressen på &buf[0] (den peger altså på buf[0] og er derfor en pointer IMHO).
Ved brug af buf2 som er en pointer til buf, skal den jo først ad omveje (fra buf2) til buf, det er
vel ikke så underligt der sker flere ting i sidste tilfælde.

Jeg kan dog ikke se hvorfor dette skulle betyde at "der bliver altså ikke allokeret en pointer",
buf bliver jo netop oprettet (den eksisterer jo) og peger direkte på &buf[0]. 

-Sune

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *