delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/07/09:01:24

From: fesenko AT pacific DOT net DOT sg (Victor)
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] array declaration
Date: Tue, 07 Oct 1997 23:42:38 GMT
Organization: Subscriber, Pacific Internet, Singapore
Lines: 14
Message-ID: <61cskr$fh8$1@newton.pacific.net.sg>
NNTP-Posting-Host: dyn105ppp67.pacific.net.sg
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

When I declare an array like this
int foo[260];
and then somewhere in the separate file I again declare it as
extern int foo[260];
the size of array is not checked, so second time I could have declared
it as [280] without a warning.

The question is how to declare the array so that it's possible to have
it's size checked to prevent mistakes.

Any insights appreciated.
Victor Fesenko 
fesenko AT pacific DOT net DOT sg  

- Raw text -


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