title: Copy from array to array by refenrence in function
body: <p>I have no idea why it doesn't work. What is more I can't even say what are errors about ;/
  Can any1 explain what are errors about?</p>
  <p>The code is suposed to :
  create a string with word like - mom.
  then create 2d array to fill it by string. Free spaces fill with _.So mom box =</p>
  <blockquote>
  <p>[m] [o]</p>
  <p>[m] [_]</p>
  </blockquote>
  <p>now fill next array with text that follows from colums. mom_ filled to new array will look like mmo_. Then I cout crypted text. I hope u understood whatI did there :D</p>
  <p>here is code</p>
  <pre><code>//wal = kolumny=wiersze
  #include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstring&gt;
  using namespace std;
  void pole(int &amp;a,const int &amp;l);
  void tab(const char &amp;s[],char &amp;d[], char &amp;f[],const int a);
  int main(){
      string code;
      cin &gt;&gt; code;
      int wall=1;
      int d=code.length();
      char tekst[d];   
      pole(wall,d);
      strcpy(tekst,code);
      char kw[wall][wall];
      char szyfr[d];
      tab(tekst,kw,szyfr,wall);   
      for (int i=0;i&lt;d;i++) 
      cout &lt;&lt; szyfr[i] &lt;&lt; endl;
      system(&quot;PAUSE&quot;);
      return 0;
  }
  void pole(int &amp;a,const int &amp;l){
      if (a*a &lt; l)
      pole(a+=1,l);
  }
  void tab(const char &amp;s[],char &amp;d[], char &amp;f[],const int a){
      int i=0;
      for (int x=0;x&lt;a;x++,i++){
          for (int y=0;y&lt;a;y++,i++){
              if(s[i])
              d[x][y]=s[i];
              else d[x][y]=='_';
              f[i]=d[x][y];
          }
      }
  }
  </code></pre>