Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int lcs( string X , string Y) {
int c[ N + 1 ][ N + 1 ] ; 
int m = X.size() ; 
int n = Y.size() ; 
int max1 = 0 ;
X = ' ' + X ;
Y = ' ' + Y ;

  for(int i = 1 ; i <= m ; i++) c[i][0] = 0 ;
  
  for(int j = 1 ; j <= n ; j++) c[0][j] = 0 ;

  for(int i = 1 ; i <= m ; i++) {
    for(int j = 1; j <= n; j++){
      if (X[i] == Y[j]) {
         c[i][j]=c[i -1][j - 1] + 1;
?????????}

      else {
         c[i][j] = max(c[i - 1][j], c[i][j - 1]);
       }
       max1 = max(max1, c[i][j] ) ;
     }
   }
 return max1 ;
}

int main(){
  string s1 , s2 ;
  int n ; cin >> n ;
  for ( int i = 0 ; i < n ; i++ ) {
      cin >> s1 >> s2 ;
 
      cout<<lcs(s1 , s2) << endl ;
  }
  
  return 0 ;
}

Compiler output:
a.cc: In function 'int lcs(std::string, std::string)':
a.cc:6:8: error: 'N' was not declared in this scope
    6 | int c[ N + 1 ][ N + 1 ] ;
      |        ^
a.cc:13:33: error: 'c' was not declared in this scope
   13 |   for(int i = 1 ; i <= m ; i++) c[i][0] = 0 ;
      |                                 ^
a.cc:15:33: error: 'c' was not declared in this scope
   15 |   for(int j = 1 ; j <= n ; j++) c[0][j] = 0 ;
      |                                 ^
a.cc:20:10: error: 'c' was not declared in this scope
   20 |          c[i][j]=c[i -1][j - 1] + 1;
      |          ^
a.cc:21:1: error: expected primary-expression before '?' token
   21 | ?????????}
      | ^
a.cc:21:2: error: expected primary-expression before '?' token
   21 | ?????????}
      |  ^
a.cc:21:3: error: expected primary-expression before '?' token
   21 | ?????????}
      |   ^
a.cc:21:4: error: expected primary-expression before '?' token
   21 | ?????????}
      |    ^
a.cc:21:5: error: expected primary-expression before '?' token
   21 | ?????????}
      |     ^
a.cc:21:6: error: expected primary-expression before '?' token
   21 | ?????????}
      |      ^
a.cc:21:7: error: expected primary-expression before '?' token
   21 | ?????????}
      |       ^
a.cc:21:8: error: expected primary-expression before '?' token
   21 | ?????????}
      |        ^
a.cc:21:9: error: expected primary-expression before '?' token
   21 | ?????????}
      |         ^
a.cc:21:10: error: expected primary-expression before '}' token
   21 | ?????????}
      |          ^
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:21:10: error: expected ':' before '}' token
   21 | ?????????}
      |          ^
      |          :
a.cc:21:10: error: expected primary-expression before '}' token
a.cc:24:10: error: 'c' was not declared in this scope
   24 |          c[i][j] = max(c[i - 1][j], c[i][j - 1]);
      |          ^
a.cc:26:25: error: 'c' was not declared in this scope
   26 |        max1 = max(max1, c[i][j] ) ;
      |                         ^