title: string to struct in C++
body: <p>I have a string variable </p>
  
  <pre><code>string pr00("")
  </code></pre>
  
  <p>and I want to call the method fun1</p>
  
  <pre><code>fun1(demo *dm)
  </code></pre>
  
  <p>demo defined as follow </p>
  
  <pre><code>typedef struct 
  {
      char pr00[100];
  }demo;
  </code></pre>
  
  <p>is that safe to call this method as</p>
  
  <pre><code>fun1((demo*)pr00);
  </code></pre>
  
  <p>thanks and BR</p>