Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: newbie C question
Home

[Freeciv-Dev] Re: newbie C question

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: newbie C question
From: Jules Bean <jules@xxxxxxxxxxxxxxx>
Date: Tue, 5 Mar 2002 12:13:49 +0000

On Tue, Mar 05, 2002 at 12:02:47PM +0000, Ben Webb wrote:
> On Tue, 5 Mar 2002, Per I. Mathisen wrote:
> 
> > Will pointers always be initialized to NULL?
> 
> No. No variables are initialised at all in C.
> 
> > I seem to remember reading that somewhere, but maybe that wasn't
> > about C :)
> 
>       Some languages do (e.g. Perl, and some implementations of 
> Fortran). But not C.

C++ does, though, no?

So if you use a C++ compiler to compile C code, then I think pointers
get initialised to '0' (NULL).

Jules



[Prev in Thread] Current Thread [Next in Thread]