Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
  while(1){
    string row1,row2;
    string period(".");
    string cover("/"");
    string none("");

    cin>>row1;
    if(row1 == period){
      break;
    }
    cin>>row2;

    if(row1 == row2){
      cout<<"IDENTICAL"<<endl;
    }
    else{
      int size1 = row1.size();
      vector<string> Row1;
      string temp2;
      int j = 0;

      for(int i = 0;i < size1;++i){ 
        string temp1;
        temp1 = row1[i];
        if(temp1 == cover){
          if(j == 0 && i != 0){
            Row1.push_back(temp2);
            j = 1;
          }
          else if((j == 0 && i == 0) || j == 1){
            Row1.push_back(none);
            j = 2;
          }
          else{
            Row1.push_back(none);
            j = 0;
          }
        }
        else if(i == size1 - 1){
          if(j == 0){
            temp2 += temp1;
            Row1.push_back(temp2);
          }
          else{
            temp2 = temp1;
            Row1.push_back(temp2);
          }
        }
        else{
          if(j == 1){
            temp2 = temp1;
            j = 0;
          }
          else{
            temp2 += temp1;
          }
        }
      }

      int size2 = row2.size();
      vector<string> Row2;
      string temp3;
      j = 0;

      for(int i = 0;i < size2;++i){ 
        string temp1;
        temp1 = row2[i];
        if(temp1 == cover){
          if(j == 0 && i != 0){
            Row2.push_back(temp3);
            j = 1;
          }
          else if((j == 0 && i == 0) || j == 1){
            Row2.push_back(none);
            j = 2;
          }
          else{
            Row2.push_back(none);
            j = 0;
          }
        }
        else if(i == size2 - 1){
          if(j == 0){
            temp3 += temp1;
            Row2.push_back(temp3);
          }
          else{
            temp3 = temp1;
            Row2.push_back(temp3);
          }
        }
        else{
          if(j == 1){
            temp3 = temp1;
            j = 0;
          }
          else{
            temp3 += temp1;
          }
        }
      }

      for(string e : Row1){
          cout<<e<<endl;
      }
      for(string e : Row2){
          cout<<e<<endl;
      }

      int Size1 = Row1.size();
      int Size2 = Row2.size();
      int count = 0;

      if(Size1 != Size2){
        cout<<"DIFFERENT"<<endl;
      }
      else{
        for(int i = 0;i <= Size1;++i){
          string check1,check2;
          check1 = Row1[i];
          check2 = Row2[i];

          if(i % 2 == 0){
            if(check1 != check2){
              cout<<"DIFFERENT"<<endl;
              break;
            }
          }
          else{
            if(check1 != check2){
              ++count;
            }
          }
          
          if(count == 2){
            cout<<"DIFFERENT"<<endl;
            break;
          }
        }
      }

      if(count == 1){
        cout<<"CLOSE"<<endl;
      }
    }
  }
  
  return 0;
}


Compiler output:
a.cc:12:21: warning: missing terminating " character
   12 |     string cover("/"");
      |                     ^
a.cc:12:21: error: missing terminating " character
   12 |     string cover("/"");
      |                     ^~~
a.cc: In function 'int main()':
a.cc:12:21: error: expected ')' before 'string'
   12 |     string cover("/"");
      |                 ~   ^
      |                     )
   13 |     string none("");
      |     ~~~~~~           
a.cc:39:28: error: 'none' was not declared in this scope
   39 |             Row1.push_back(none);
      |                            ^~~~
a.cc:43:28: error: 'none' was not declared in this scope
   43 |             Row1.push_back(none);
      |                            ^~~~
a.cc:82:28: error: 'none' was not declared in this scope
   82 |             Row2.push_back(none);
      |                            ^~~~
a.cc:86:28: error: 'none' was not declared in this scope
   86 |             Row2.push_back(none);
      |                            ^~~~