C++::How to put different length arrays of const strings into common class
<p>Sorry, new to C++, converting from C, and have struggled to find a good way to do this...</p>

<p>//Fragment follows</p>

<pre><code>const char *List1[]={"Choice1", "Not a good choice", "choice3"}; //rom-able
const char *List2[]={"Hello", "Experts", "Can", "You", "Help?"};

class ListIF{
private:
 int index;
 char *list;
public:
  void GetValString(char *tgt,int len);//get parameter value as string max len chars
  void SetIndex(int n){index = n;};
  int  GetIndex(void){return index;};
};
</code></pre>

<p>//end Fragment</p>

<p>The problem is how to write the constructor so that I can "encapsulate" the lists inside the class, without getting heap bloat (embedded target).  And then how to write the gettor so that we can see list[index] within the class.</p>

<p>I am going daft trying to do something that seems obvious, so I am missing something?</p>
