[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] malloc ter sig underligt



Anders Melchiorsen <sslug@sslug> writes:

> Prøv med:
>
>             pointer = (int *) malloc(100 * sizeof(int));
>             hent = find_numbers(pointer,tal); 

Men i længden ville det nok være bedre at lade find_numbers allokerer
nok plads så man havde noget ala;

int** find_numbers(int tal);

int **pointer;
pointer = find_numbers;
while(pointer != NULL) {
    printf("%d\n",**pointer)
    pointer++;
}


-- 
 Peter Makholm     |         Perhaps that late-night surfing is not such a
 sslug@sslug |           waste of time after all: it is just the web
 http://hacking.dk |                                              dreaming
                   |                                    -- Tim Berners-Lee


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 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] *