title: Segmentation fault on string assignment in C++
body: <p>Take a look at this example function:</p>
  
  <pre><code>RuntimeConfiguration* conf_rt_conf() {
  
      RuntimeConfiguration *conf;
      conf = new RuntimeConfiguration();
      conf-&gt;arch_path="./archive";
      conf-&gt;err_log="./err_log";
      conf-&gt;fail_log="./fail_log";
      conf-&gt;msg_log="./msg_log";
      conf-&gt;save="html, htm, php";
      conf-&gt;ignore="jpg, gif";
      conf-&gt;cookies="";
  
      return conf;
  }
  </code></pre>
  
  <p>Everything here works fine, but when I run something like this:</p>
  
  <pre><code>DatabaseInput** conf_db_input() {
  
      DatabaseInput **db_input;
      db_input=(DatabaseInput **)malloc(NUMB_SITES*sizeof(DatabaseInput *));
      for (int i=0;i&lt;NUMB_SITES;i++) db_input[0]= new DatabaseInput();
  
      db_input[0]-&gt;full_name="ABCNews";
      db_input[0]-&gt;alias="abcn";
      db_input[0]-&gt;prefix="/eng";
  
      db_input[1]-&gt;full_name="Rzeczpospolita";
      db_input[1]-&gt;alias="rp";
      db_input[1]-&gt;prefix="/pol";
  
      return db_input;
  }
  </code></pre>
  
  <p>I get segmentation fault on first assignment.
  It probably has something to do with the fixed memory block allocated for this struct. How do I get it to work properly?</p>