Redefinition of struct error, I only defined it once
<p>I really don't understand how to fix this redefinition error.</p>

<p><strong>COMPILE+ERRORS</strong></p>

<pre><code>g++ main.cpp list.cpp line.cpp
In file included from list.cpp:5:0:
line.h:2:8: error: redefinition of âstruct Lineâ
line.h:2:8: error: previous definition of âstruct Lineâ
</code></pre>

<p><strong>main.cpp</strong></p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
#include "list.h"

int main() {
    int no;
    // List list;

    cout &lt;&lt; "List Processor\n==============" &lt;&lt; endl;
    cout &lt;&lt; "Enter number of items : ";
    cin  &gt;&gt; no;

    // list.set(no);
    // list.display();
}
</code></pre>

<p><strong>list.h</strong></p>

<pre><code>#include "line.h"
#define MAX_LINES 10
using namespace std;

struct List{
    private:
        struct Line line[MAX_LINES];
    public:
        void set(int no);
        void display() const;
};
</code></pre>

<p><strong>line.h</strong></p>

<pre><code>#define MAX_CHARS 10
struct Line {
    private:
        int num;
        char numOfItem[MAX_CHARS + 1]; // the one is null byte
    public:
        bool set(int n, const char* str);
        void display() const;
};
</code></pre>

<p><strong>list.cpp</strong></p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstring&gt;
using namespace std;
#include "list.h"
#include "line.h"

void List::set(int no) {}

void List::display() const {}
</code></pre>

<p><strong>line.cpp</strong></p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstring&gt;
using namespace std;
#include "line.h"

bool Line::set(int n, const char* str) {}

void Line::display() const {}
</code></pre>
