Language: C++

#include<bits/stdc++.h>
using namespace std;
# define ll long long int;
const long long M = 1000000007;


int main()
{

  ll r,c;
  cin>>r>>c;
  char arr[r][c];
  long long arr1[r][c];
  for(int i=0;i<r;i++)
  {
    for(int j=0;j<c;j++)
    {
      cin>>arr[i][j];
    }
  }
    ll count1=0;
    ll count2=0;
    for(int j=0;j<c;j++)
    {
      if((arr[0][j]=='.') && (count1==0))
      {
          arr1[0][j]=1;
      }
      else if(arr[0][j]=='#')
      { arr1[0][j]=0;
        count1++;
      }
      else if((arr[0][j]=='.') && (count1>0))
      {
          arr1[0][j]=0;
      }

    }

    for(int i=0;i<r;i++)
    {
      if((arr[i][0]=='.') && (count2==0))
      {
          arr1[i][0]=1;
      }
      else if(arr[i][0]=='#')
      {  arr1[i][0]=0;
        count2++;
      }
      else if((arr[i][0]=='.') && (count2>0))
      {
          arr1[i][0]=0;
      }
    }

    for(int i=1;i<r;i++)
    {
      for(int j=1;j<c;j++)
      { if(arr[i][j]=='#')
        {    arr1[i][j]=0;
         }

        else if( (arr[i-1][j]=='#') && (arr[i][j-1]!='#'))
        {
          arr1[i][j]= 0 + arr1[i][j-1];
        }
        else if( (arr[i-1][j]!='#') && (arr[i][j-1]=='#'))
        {
          arr1[i][j]=arr1[i-1][j]+ 0;
        }
        else if( (arr[i-1][j]=='#') && (arr[i][j-1]=='#'))
        {
          arr1[i][j]=0;
        }
        else
        {
          arr1[i][j]=arr1[i-1][j] + arr1[i][j-1];
        }
      }
    }


    cout<<arr1[r-1][c-1]%M<<endl;
    //for(int i=0;i<r;i++)
    //{
    //  for(int j=0;j<c;j++)
    //  {
    //    cout<<arr1[i][j];
    //  }
    //  cout<<endl;
  //  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:23: error: declaration does not declare anything [-fpermissive]
    3 | # define ll long long int;
      |                       ^~~
a.cc:10:3: note: in expansion of macro 'll'
   10 |   ll r,c;
      |   ^~
a.cc:10:6: error: 'r' was not declared in this scope
   10 |   ll r,c;
      |      ^
a.cc:10:8: error: 'c' was not declared in this scope
   10 |   ll r,c;
      |        ^
a.cc:18:12: error: 'arr' was not declared in this scope
   18 |       cin>>arr[i][j];
      |            ^~~
a.cc:3:23: error: declaration does not declare anything [-fpermissive]
    3 | # define ll long long int;
      |                       ^~~
a.cc:21:5: note: in expansion of macro 'll'
   21 |     ll count1=0;
      |     ^~
a.cc:21:8: error: 'count1' was not declared in this scope
   21 |     ll count1=0;
      |        ^~~~~~
a.cc:3:23: error: declaration does not declare anything [-fpermissive]
    3 | # define ll long long int;
      |                       ^~~
a.cc:22:5: note: in expansion of macro 'll'
   22 |     ll count2=0;
      |     ^~
a.cc:22:8: error: 'count2' was not declared in this scope
   22 |     ll count2=0;
      |        ^~~~~~
a.cc:25:11: error: 'arr' was not declared in this scope
   25 |       if((arr[0][j]=='.') && (count1==0))
      |           ^~~
a.cc:27:11: error: 'arr1' was not declared in this scope
   27 |           arr1[0][j]=1;
      |           ^~~~
a.cc:30:9: error: 'arr1' was not declared in this scope
   30 |       { arr1[0][j]=0;
      |         ^~~~
a.cc:35:11: error: 'arr1' was not declared in this scope
   35 |           arr1[0][j]=0;
      |           ^~~~
a.cc:42:11: error: 'arr' was not declared in this scope
   42 |       if((arr[i][0]=='.') && (count2==0))
      |           ^~~
a.cc:44:11: error: 'arr1' was not declared in this scope
   44 |           arr1[i][0]=1;
      |           ^~~~
a.cc:47:10: error: 'arr1' was not declared in this scope
   47 |       {  arr1[i][0]=0;
      |          ^~~~
a.cc:52:11: error: 'arr1' was not declared in this scope
   52 |           arr1[i][0]=0;
      |           ^~~~
a.cc:59:12: error: 'arr' was not declared in this scope
   59 |       { if(arr[i][j]=='#')
      |            ^~~
a.cc:60:14: error: 'arr1' was not declared in this scope
   60 |         {    arr1[i][j]=0;
      |              ^~~~
a.cc:65:11: error: 'arr1' was not declared in this scope
   65 |           arr1[i][j]= 0 + arr1[i][j-1];
      |           ^~~~
a.cc:69:11: error: 'arr1' was not declared in this scope
   69 |           arr1[i][j]=arr1[i-1][j]+ 0;
      |           ^~~~
a.cc:73:11: error: 'arr1' was not declared in this scope
   73 |           arr1[i][j]=0;
      |           ^~~~
a.cc:77:11: error: 'arr1' was not declared in this scope
   77 |           arr1[i][j]=arr1[i-1][j] + arr1[i][j-1];
      |           ^~~~
a.cc:83:11: error: 'arr1' was not declared in this scope
   83 |     cout<<arr1[r-1][c-1]%M<<endl;
      |           ^~~~