Embedded C++: Initialization of an array member of a struct within a class, size omitted
<p>Hello there and thanks in advance for any help on the following matter.</p>

<p>Edit:  <em>I forgot to add that this is on an embedded system with no access to STL features.</em>  My apologies for leaving this very important piece of information out.  This is my first time coding in C++ extensively so I forgot to mention the obvious.  I came back to add this fact and this question had already received some replies.  Thank you all for such a quick response!</p>

<p>I am trying to initialize an array member of a struct that is in turn a public member of a C++ class.  The array size is omitted in the struct.  Here is an example:</p>

<pre><code>// ClassA.h

Class A  
{
   public:

   struct StructA
   {
      StructB structs[];
   }; 

   struct StructB
   {
      // stuff
   };

   ClassA();
   //etc
};

// ClassB.h

ClassB: public ClassA
{

  public:

  StructA structA;

  ClassB()
  // etc
};

// ClassB.cpp

// What do I do here?  
</code></pre>

<p>I tried:</p>

<p><code>StructA ClassB::structA.structs[] = { first, second, third }</code></p>

<p>without any luck.  I'm relatively new to C++ so this one has stumped me.
I can add a size to the array member in StructA but I would rather not if
there is a legal way to handle this.</p>

<p>Thanks!</p>
