title: incompatible types of assignment of int to int [x]
body: <p>So there is a matrix of n lines and m columns, x y are coordonates for a the tree that was first on fire. Figure out how many days until the hole forest is burnt down.</p>
  
  <p>I think I got the code down but there is a problem with it.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      int n,m,p[5][5],x,y,z=1,c,a=1,b=1;
      cout&lt;&lt;"Cate linii de copaci sunt:";
      cin&gt;&gt;n;
      cout&lt;&lt;"Cate coloane de copaci sunt:";
      cin&gt;&gt;m;
      cout&lt;&lt;"Coordonata X a copacului de la care a izbucnit focul:";
      cin&gt;&gt;x;
      cout&lt;&lt;"Coordonata Y a copacului de la care a izbucnit focul:";
      cin&gt;&gt;y;
      p[x][y]=1;
          while (c!=0) {
              c=0;
              if (b!=0) {
                      b=0;
              if (x+a&lt;=n) {
                   p[x+a]=1;
                   b++;
              }
               if (x-a&lt;=n) {
                   p[x-a]=1;
                   b++;
              }
               if (y+a&lt;=m) {
                   p[x+a]=1;
                   b++;
              }
               if (y-a&lt;=m) {
                   p[x-a]=1;
                   b++;
              }
              c=1;
              z++;
              }
              a++;
          }
          cout&lt;&lt;"In total a durat "&lt;&lt;z&lt;&lt;" zile ca sa arda toata padurea.";
      return 0;
  
  }
  
  </code></pre>
  
  <p>At every if p[x/y -/+ a]=1 there is this error:
  incompatible types in assignment of int to int[5]</p>
  
  <p>If anyone could help me understand what have I done wrong for this error to show up. And also if there is a better solution than the one I have wrote I would appriciate to see it.
  I know it is probably an easy error but I'm still at the beginning of my coding career.</p>
  
  <p>Thanks for helping/reading! Have a nice day !</p>
  
  <p>When I declared the Matrix.. if If I change the columns and lines to another value, the error will show up incompatible types in assignment of int to int[that value that I've put in declaration]</p>
  
  <p>Uhm, haven't really expected anything because I am learning but the results I was hoping for were to not have this error, maybe a different error I would have known to solve but never saw this one.</p>