[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



Peter Makholm <sslug@sslug> wrote:

> Hvis jeg kun har en int* kan jeg ikke finde slutningen af arrayet. Der
> er ikke nogen værdi af typen int der udtrykker at arrayet er slut.

Garantien for at et int*-array er mere nul-afsluttet end et int-array
er da vist til at overskue. Så vi skal i begge tilfælde vide noget om
hvad funktionen returnerer.


[...]

>>> int **pointer;
>>> pointer = find_numbers;
>>> while(pointer != NULL) {
>>>     printf("%d\n",**pointer)
>>>     pointer++;
>>> }
>>
>> Der mangler vist lige en stjerne foran "pointer" i while-linjen.
>
> Nej.

Så afsluttes løkken aldrig (hvis den går i gang)?

Enten det, eller jeg er for træt til at sidde her.


Godnat,
 Anders.


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