[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] tilgaa 2-dim array



Så vidt jeg kan se bliver matrix alligevel en pointer til et array af
pointere til int og de efterfølgende manipulationer er på pointerne og
ikke på indholdet. I øvrigt bør det slet ikke kunne bruges, for
2-dimensionale arrays finder man rundt i ved at det første index
multipliceres med det andets erklærede størrelse. Altså er et array
erklæret som [5][10], så findes en placering at [2][5] ved at der
beregnes 2 * 10 + 5 i forhold til arrayens startadresse. c ville blive
møgsur, men måske kan man den slags i c++.

m.v.h.
Søren


sslug@sslug wrote:
> 
> Peter Makholm wrote:
> 
> > Det lyder som en makro, mon ikke den er defineret som:
> >
> > #define CALLOC(t,n) calloc(n,size_of(t))
> >
> > Jeg kan ikke finde den defineret noget sted i i min /usr/include.
> 
> Jo, det er en makro og den er defineret som du skriver.
> -Har det betydning ?
> 
> med venlig hilsen Marie Louise


 
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] *