Step 1
Recall that we learned in Lab 11 that as your projects begin to get more complicated and require multiple files, avoiding a soupy mess of #includes may become much more difficult. As programs grow in complexity, it becomes necessary to guard header files against multiple inclusion -- which is what happens when somehow, the same file is included in main twice by two different things.
Put the following lines of code at the beginning of linkedlist.h:
#ifndef _LINKEDLIST_H
#define _LINKEDLIST_H
and put the following line of code at the very end of linkedlist.h:
#endif
Then go ahead and compile, link, and run the code.
What this code is basically saying is: "If _LINKEDLIST_H (linkedlist.h) isn't defined, define it!" This will protect your code against multiple inclusions. For future courses, you'll be expected to guard each and every header file. It's just a good habit to get into.
You may now continue to Step 2...