C++ Error: undefined reference to `main'
<p>I'm working on a simple class List, but when compiling the header and cpp file, I get the error: undefined reference to `main'</p>

<p>What am I doing wrong, and how could I fix this?</p>

<p>Here is the list.h file that has simple headers:</p>

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

<pre><code>#ifndef LIST_H
#define LIST_H

#include &lt;string&gt;

const int DEFAULT_CAPACITY = 100;

class List
{
    public:
        List();
        List(int capacity);
        ~List();
        void push_back(std::string s);
        int size() const;
        std::string at(int index) const;

    private:
        std::string* mData;
        int mSize;
        int mCapacity;
};

#endif
</code></pre>

<p>And here is the list.cpp file:</p>

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

<pre><code>#include "list.h"
#include &lt;string&gt;

List::List(){
    mData = new std::string[DEFAULT_CAPACITY];
    mSize = 0;
    mCapacity = 100;
};

List::List(int capacity){
    mData = new std::string[capacity];
    mSize = 0;
    mCapacity = capacity;
};

List::~List(){
    delete[] mData;
};

void List::push_back(std::string s){
    if (mSize&lt;mCapacity){
        mData[mSize] = s;
        mSize++;
    }
};

int List::size() const{
    return mSize;
};

std::string List::at(int index) const{
    return mData[index];
};
</code></pre>

<p>I tried experimenting around with "using namespace std" and how to include , but I can't figure out how to get these errors to go away. What is causing them?</p>
