TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Robin Sheppard
date: 1999-01-02 02:02:10
subject: Array Problem

KD> Each of those lines can be re-written as a 'string', in that case
 KD> use char array[5][6] = {                                               
 KD>         "x#xxx",                                         
             
 KD>         "x###x",                                         
             
 KD>         "xxx#x",                                         
             
 KD>         "xo##x",                                         
             
 KD>         "xxxxx"};                                        
             
 KD>                                                                        

 JB> You can use a 5x5 array here too, you'll just lose the terminating
 JB> NULs. 
 JB> char a[5][5]={"x#xxx","x###x"... etc.

   Yeah, you'll lose them all except the last one.  I think I read 
   somewhere (probably in a message on this echo) that the standard 
   requires that you can write to memory one byte past the end of a 
   string without problems, but it's still not a good practice to get 
   into, in my opinion.
   
... DOS never says "GOOD command or filename"...
___ Blue Wave/DOS v2.30 [NR]

--- Maximus 2.01wb
* Origin: Basic'ly Computers: Mooo-ing Right Along. (1:153/9)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 634/397 635/506 728 639/252
SEEN-BY: 670/218
@PATH: 153/104 2 716 7715 140/1 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.