C++ Vector of vectors is messing with me
<p>If I put this code in a .cpp file and run it, it runs just fine:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;string&gt;


using namespace std;

typedef vector&lt;int&gt; row;
typedef vector&lt;row&gt; myMatrix;

void main()
{
    //cout &lt;&lt; endl &lt;&lt; "test" &lt;&lt; endl;
    myMatrix mat(2,2);

    mat[0][1] = 2;

    cout &lt;&lt; endl &lt;&lt; mat[0][1] &lt;&lt; endl;
}
</code></pre>

<p>But, if I make a .h and a .cpp file with the .h file like this, it gives me boatloads of errors.</p>

<pre><code>#ifndef _grid_
#define _grid_

#include&lt;iostream&gt;
#include&lt;vector&gt;
#include&lt;string&gt;

using namespace std;

typedef vector&lt;int&gt; row;
typedef vector&lt;row&gt; myMatrix;

class grid
{
    public:

        grid();

        ~grid();

        int getElement(unsigned int ri, unsigned int ci);

        bool setElement(unsigned int ri, unsigned int ci, unsigned int value);


    private:

        myMatrix sudoku_(9,9);
};

#endif
</code></pre>

<p>These are some of the errors I get:</p>

<pre><code>warning C4091: 'typedef ' : ignored on left of 'int' when no variable is declared
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
</code></pre>
