dna.cpp: In function 'int get_distance(int, int)':
dna.cpp:28:12: error: conflicting declaration 'std::string a1'
28 | string a1 = u.substr(x,y-x+1);
| ^~
dna.cpp:16:9: note: previous declaration as 'int a1'
16 | int a1 = 0;
| ^~
dna.cpp:30:26: error: request for member 'length' in 'a1', which is of non-class type 'int'
30 | for(int i = 0;i < a1.length();i++){
| ^~~~~~
dna.cpp:31:12: error: 'a' was not declared in this scope
31 | if(a[i] == 'T'){
| ^
dna.cpp:34:12: error: 'b' was not declared in this scope
34 | if(b[i] == 'T'){
| ^
dna.cpp:37:12: error: 'a' was not declared in this scope
37 | if(a[i] == 'A'){
| ^
dna.cpp:40:12: error: 'b' was not declared in this scope
40 | if(b[i] == 'A'){
| ^
dna.cpp:43:12: error: 'a' was not declared in this scope
43 | if(a[i] == 'C'){
| ^
dna.cpp:46:12: error: 'b' was not declared in this scope
46 | if(b[i] == 'C'){
| ^
dna.cpp:49:14: error: invalid types 'int[int]' for array subscript
49 | if(a1[i] == 'T' && b1[i] == 'A'){
| ^
dna.cpp:52:14: error: invalid types 'int[int]' for array subscript
52 | if(a1[i] == 'A' && b1[i] == 'T'){
| ^
dna.cpp:55:14: error: invalid types 'int[int]' for array subscript
55 | if(a1[i] == 'A' && b1[i] == 'C'){
| ^
dna.cpp:58:14: error: invalid types 'int[int]' for array subscript
58 | if(a1[i] == 'C' && b1[i] == 'A'){
| ^
dna.cpp:61:14: error: invalid types 'int[int]' for array subscript
61 | if(a1[i] == 'T' && b1[i] == 'C'){
| ^
dna.cpp:64:14: error: invalid types 'int[int]' for array subscript
64 | if(a1[i] == 'C' && b1[i] == 'T'){
| ^