title: Getting the size of the char* array passed as an input to C++ function
body: <p>I am trying to pass a character pointer array as an input from C test driver to C++ function (available in C wrapper)</p>
  
  <pre><code>char* LowerList[10];
  LowerList[0]="abc";
  LowerList[1]="def";
  LowerList[2]="hij";
  </code></pre>
  
  <p>When available on the C++ side the values displayed for the the element is displayed as </p>
  
  <pre><code>char* LowerList[0]="abc";
  LowerList[1]="def";
  LowerList[2]="hij";
  LowerList[3]=ƒì¶S&lt;\$ UV&lt;35?Ä@
  LowerList[34]=ƒ&lt;bad pointer&gt;
  </code></pre>
  
  <p>I need to get the size of the array passed on to the C++ size which I could have got using 
  while (LowerList[count]) but unable to do so because of the junk value.
  Please let me know if any way I can find the correct size of the char* LowerList[] by initialising ,memory allocation or converting it to vector.</p>
  
  <p>Corrected the above code for typo error</p>
  
  <p>Here are my comments on some of the suggestions given to me so far:</p>
  
  <p>1) Pass the size of the array as a parameter as well- A limitation for my scenario .2) Conversion to the vector need the size to be available 3) Sentinel value at which position I need to add . As stated earlier I am trying to handle a scenario where the user pass the value as 3 which leads to the failure.I don't have any control on restricting the way C user my C++ wrapper with his C test driver. </p>