[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: [PROGRAMMERING] Problem i god gammeldaws c



Doooh - selvfølgelig.

Et & i kaldet og ** i funktionen, så virker det hele perfekt. Tusind tak for
det.

// Søren H. Sørensen


2009/8/14 "Søren H. Sørensen" <sslug@sslug>

> Hej alle.
>
> Gad vide om nogen her kan huske god gammel K&R c. Åbenbart kan jeg vist
> ikke, så derfor er jeg rendt panden ind i et problem med noget simpel
> pointer-gymnastik.
>
> Man tager en global variabel:
> struct liste *anchor1=NULL;
>
> Så laver man en funktion som
> void scandirec( char *path, struct liste *pntr, int number )
>
> Den kalder man med
> scandirec("/dosf/Ripped/mp3-nye/For Fuld Musik 1-1", anchor1, 0);
>
> Nede i scandirec laver man så en
> pntr=calloc(1, sizeof(struct liste));
>
> Og tror nu variablen anchor1 bliver adressen på en buffer - det gør den
> ikke. Den forbliver NULL. Hvorfor???
> Forresten har pntr faktisk en plausibel værdi indenfor scandirec.
>
> Jeg kan sagtens by-passe problemet, men der må være noget grundlæggende jeg
> har glemt.
>
> Mange venlige hilsner
> Søren H. Sørensen
>


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-09-01, 02:01 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] *