title: initialize char matrix in class constructor
body: <p>I need to initialize my variable in class constructor (because initializing it with declaration is bad, of course, although in works). I tried to initialize it with loop but I don't know how to do it properly. How can I solve this? Should I use pointers?</p>
  
  <pre><code>class Track
  {
  private:
      char track[18][19];
      /*
  
      need to initialize equal to
      track[18][19] = {
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |",
              "|               |"
      };*/
  
  public:
  
      Track(){
          for (int i=0; i&lt;18; i++)
              for (int j = 1; j &lt; 18; j++) {
                  track[i][j] = ' ';
              }
  
          for (int i = 0; i &lt; 18; i++) {
              track[i][0] = '|';
              track[i][sizeof(track[i]) / sizeof(track[i][0])] = '|';
          }
          //how to initialize track?
      }
  
      void Draw() {
          for (int i = 0; i &lt; 18; i++) {
              cout &lt;&lt; track[i] &lt;&lt; endl;
          }
      }
  };
  </code></pre>