Since you already have List typedef'd as struct node, you simply need to declare your variables as
List *Set[997];
>> How do I make an array full of pointers to Lists? The main thing is that I want every element to be initialized to NULL like this:
Try declaring your array as:
List *Set[997] = {0};

Re: typedef array problems

Just for further clarification:

'\0' is the null character.

NULL is a null pointer (which is actually just defined as 0).

But, since chars can be typecast into bytes without a problem, '\0' will be typecast into 0. But, I would assume good coding pratice is to use NULL or 0 for a null pointer, and use the null character ('\0') for string termination.

Also, the following will only put a NULL in the first element of the array, not each of the elements.

List *Set[997] = {0};

I'm sorry but you're misinformed. That statment does set the first element to 0, but any elements you don't provide an initial value for in an initializer list will also be initialized with 0, so a statement like this:

double a[100][100]={0};

will initialize every element of the 100x100 array with 0. In fact,

double a[100][100]={};

will initialize every element of the array with 0. And, a statement like:

double a[100][100] = {1, 2, 3};

will initialize the first three elements with the values shown and all the other elements will be initialized with 0.

It sounds like you're a little confused between the keyword "typedef" and structs. typedef allows you to create a synonym for a type that already exists. For instance, you could do something like this:

typedef int Bigones;

That specifies Bigones as an alternative specifier for the type int, so you could then declare a variable of type int like this:

Originally posted by 7stud I'm sorry but you're misinformed. That statment does set the first element to 0, but any elements you don't provide an initial value for in an initializer list will also be initialized with 0, so a statement like this:

Small side note -- in C you have to declare novel as:
struct Book novel;

In C++, you can declare it as:
struct Book novel;
Book novel;

Either way is valid in C++, but only the first declaration is valid in C. This is cited as one of the improvements C++ made to C (making the struct keyword optional for struct variable declarations) :). However, if you use a typedef to make an alias for struct book like so:

typedef struct Book BOOK;
BOOK novel;

The above code will work for both C and C++, since BOOK is a typedef for struct Book.