www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/11/09:47:28

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE30138A568@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: ? array[n] or array[n+1] ?
Date: Tue, 11 May 1999 14:47:45 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Ya'qub writes:
> Surely, the compiler *should* complain when you do such a thing as
> overrunning an array.

Not at all. C is a bare bones language with no built in error checking
at all. This is a big part of what makes it so powerful, because you
can treat memory in absolutely any way you like, but it also makes it 
very easy to shoot yourself in the foot. A C compiler does exactly what 
you tell it to do, so if you tell it wrong, it does something wrong.


	Shawn Hargreaves.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019