 <p>Declare it right in your code there:</p> <pre><code>class Datastructure { private: struct Ship { // Constructor!!! Ship(); std::string s_class; std::string name; unsigned int length; } minShip, maxShip; std::vector&lt;Ship&gt; shipVector; public: Datastructure(); ~Datastructure(); }; </code></pre> <p>Then to define, use the proper scope:</p> <pre><code>Datastructure::Ship::Ship() { // stuff } </code></pre>