title: String Printer problems: no known conversion for argument X from ‘char (*)[xx]’ to ‘char**’
body: <p>If there is one thing I hate about C++ is pointers. Now I checked other thread and could still not make it work. The code is pretty simple, I am passing a string of character in parameter, but I want to pass it in reference to modify the content of the string. I don't want to use STD classes. Here is the code:</p>
  
  <p>The function is declared like this:</p>
  
  <pre><code>public: static void bitfield_to_strfield ( s_EnhancedSQLobject_strfield hash[], char **str, int bitfield );
  </code></pre>
  
  <p>I am trying to call the function like this:</p>
  
  <pre><code>EnhancedSQLobject::bitfield_to_strfield ( STRFLD_ELEMENTAL_PROPERTY, &amp;p_resistance_str, p_resistance );
  </code></pre>
  
  <p>The string is declared as:</p>
  
  <pre><code>private: char p_resistance_str [ EnhancedSQLobject_STRFIELD_LEN ];
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>no known conversion for argument 2 from ‘char (*)[94]’ to ‘char**’
  </code></pre>
  
  <p>According to this thread</p>
  
  <p><a href="https://stackoverflow.com/questions/20467514/c-char-to-char-conversion">C++ char*[] to char** conversion</a></p>
  
  <p>There seems to be some sort of implicit conversion problem. I tried creating a temporary variable before passing it in parameter and it still does not work.</p>
  
  <pre><code>char **tmptr = &amp;p_resistance_str;
  </code></pre>
  
  <p>gives me</p>
  
  <pre><code>cannot convert ‘char (*)[94]’ to ‘char**’ in initialization
  </code></pre>
  
  <p>The reason I do this is that if the return value is a string, it will return me a null pointer unless I dynamically allocate the string, return the string, then destroy the string.</p>
  
  <p>Else is it possible to declare a parameter as:</p>
  
  <pre><code>char *[] str
  </code></pre>
  
  <p>since I should only be using fixed width strings.</p>