The error message says:
In functionvoid LCSlength(std::__cxx11::string, std::__cxx11::string, int, int)
Error:
expression cannot be used as a function lookup[ i ][ j ] = max (lookup[i - 1] [ j ],lookup[ i ] [ j - 1 ]);
#define max 20
int lookup[max][max];
void LCSlength(string x,string y,int m,int n)
{
for(int i = 1;i<=m;i++)
{
for(int j = 1;j<=n;j++)
{
if(x[i - 1] == y[j - 1])
lookup[i][j] = lookup[i - 1][j - 1] + 1;
else
lookup[i][j] = max(lookup[i - 1][j], lookup[i][j - 1]);
}
}
}