How to create an array of pointers to a struct
<p>I have this </p>

<pre><code>struct Book{
    string id;
    string title;
    string author;
};
</code></pre>

<p>and then I want to create dynamically an array of pointers to the struct. I have already tried this and i get segmentation fault.</p>

<pre><code>Book *array[]= (Book*) malloc(sizeof(Book)); 
</code></pre>

<p>I want to create a list of books (id,title,author). Should i try to create an array of structs instead? </p>
