Hi, I have a few questions about this matrix "table"
I can't find any wrong in it
but errors keeps appear
C2057 expected constant expression
C2466 cannot allocate an array of constant size 0
C2087: 'table' : missing subscript
C2133: 'table' : unknown size
here's the code
thanks for helping
Code:
int lcs(string str1, string str2, string & sequence) {
int rows=str1.length() + 1, cols=str2.length() + 1, position, seqLength;
int table[rows][cols];
int i, j;
......
int main() {
string inp, first, second, outp;
int seqlen;
getline(cin, inp);
first = stripBlanks(inp);
getline(cin, inp);
second = stripBlanks(inp);
seqlen = lcs(first, second, outp);
......