title: how to solve incompatible types in assignment of ‘std::list<int>*’ to ‘std::list<int> [0]’?
body: <p>It's a simple graph algorithm in c++</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;list&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  class Graph {
      public:
          Graph(int v = 1):
              vertexs(v), edges(0) {
                  adj = new list&lt;int&gt;[vertexs];
              }
  
          void test_put() {
              int iter_cnt = 0;
              for (int i = 0; i &lt; vertexs; i++) {
                  for (int j = 0; j &lt; 3; j++) {
                      adj[i].push_back(iter_cnt++);
                  }
              }
          }
  
          void test_print() {
              list&lt;int&gt;:: iterator iter;
              for (int i = 0; i &lt; vertexs; i++) {
                  for (iter = adj[i].begin(); iter != adj[i].end(); iter++) {
                      cout &lt;&lt; *iter &lt;&lt; "-&gt;";
                  }
                  cout &lt;&lt; "###" &lt;&lt; endl;
              }
          }
  
      private:
          int vertexs;
          int edges;
          list&lt;int&gt; adj[];
  };
  
  int main() {
      Graph g(10);
      g.test_put();
      g.test_print();
  }
  </code></pre>
  
  <p>There's an error</p>
  
  <pre><code>ian@ubuntu:~/tmp$ g++ wgraph.cpp -o wg
  wgraph.cpp: In constructor ‘Graph::Graph(int)’:
  wgraph.cpp:12:44: error: incompatible types in assignment of ‘std::list&lt;int&gt;*’ to ‘std::list&lt;int&gt; [0]’
  </code></pre>
  
  <p>I am a java programmer, I don't know how to make proper constructor in c++.</p>