initializing struct object declared in class private in c++
<p>I am declaring my struct object inside my class private and i am initializing them using constructors but my style checker says that the member function of my struct type are not initialized. Can any one help me in this regards i will be very thankful to you.</p>

<p>Below is my code please suggest some solution to this problem  </p>

<pre><code>class Datastructure{

  //forward decleration
  struct Ship;

public:

  //Constructor DS class
  Datastructure();

 //Destructor DS class
  ~Datastructure();



private:

   struct Ship{
     std::string s_class;
     std::string name;
     unsigned int length;
     Ship();
     Ship(const std::string&amp; shipClass, const std::string&amp; shipName,
          unsigned int len);
   };

  Ship minShip;
  Ship maxShip;
  std::vector&lt;Ship&gt; shipVector;
};

#endif
</code></pre>

<p>it is giving me the following warnings</p>

<pre><code>  CIMP, line 17: Uninitialized member variables in class 'Datastructure'.
  FSCH, line 17: No access specifiers at the beginning of class
                 'Datastructure'.
  IVAP, line 62: Field 'minShip' in class 'Datastructure' is not initialized.
  IVAP, line 63: Field 'maxShip' in class 'Datastructure' is not initialized.
  IVAP, line 64: Field 'shipVector' in class 'Datastructure' is not
                 initialized.
</code></pre>
