Hi,
In this following section of my code I'm getting a segmentation fault:
Code:
/* Displays a summary of all books in the system. */
void displayBooks(BookListType* booklist)
{
BookType* curr;
curr = booklist->head;
printf("%s %2s %32s %11s %5s %7s\n","ID","Title","Author","Year","Price","Co$
printf("-- ------------------------------- ------------- ---- ------- -----\$
while(curr != NULL)
{
printf("%2d %-31s %-13s %-2d%2c%06.2f %5d\n",curr->id,curr->title,curr->a$
curr = curr->next;
}
}
When I run my program on Ubuntu I'm not getting any errors. Would anyone know what could be causing this?