Posted by Mark Burford on 2001-04-08
Hi again, is it possible to initialise an array of pointers to NULL i.e.
"\0" .
For example an array of size 10 maybe, with the first 4 pointers pointing
to maybe Happy, Sleepy, Grumpy , Dock, and the rest being from 4 to 9 set
as null bytes.
Basically, can I shove an array full of null bytes??
my current code is as follows:-
char *Dictionary[200]; /*Dictionary*/
int j = 4;
Dictionary[0] = "A";
Dictionary[1] = "B";
Dictionary[2] = "C";
Dictionary[3] = "D";
/*initialise dictionary to NULL*/
for (j = 4; j < 200; j++)
Dictionary[j] = "\0";
Many thanks
Mark R Burford
Undergraduate in The Dept. Of
Electronics And Computer Science
University Of Southampton
Mobile: 07730 437375
Email: mrb199@xxx.xxxxx.xx.xx
Previous post | Next post | Timeline | Home