[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] hvor er NULL lige defineret



----- Original Message ----- 
From: "Kim Schulz" <sslug@sslug>
>

> hejsa
> jeg har en linje:
> while((*m++ = *s++) != NULL);
>
> Basalt set en hurtig kopiering.
>
> nu er det så at jeg får :
> main.c:84: warning: comparison between pointer and integer
>
> når jeg compiler.
>
> Jeg har før fået nogle lignede fordi jeg ikke havde en header inkluderet
> som definerede en eller anden type.
> Så mit spørgsmål er nu. Hvad glemmer jeg/gør jeg galt?

NULL er defineret ved
#define NULL (void*)0

NULL er altså en pointer, men *m (contents of m) er sikkert en integer, eller
hvad.

mvh
/Kasper




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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