lang.cpp: In function 'void excerpt(int*)':
lang.cpp:8:4: error: 'set' was not declared in this scope; did you mean 'std::set'?
8 | set<int> chars;
| ^~~
| std::set
In file included from /usr/include/c++/10/set:61,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_set.h:94:11: note: 'std::set' declared here
94 | class set
| ^~~
lang.cpp:8:8: error: expected primary-expression before 'int'
8 | set<int> chars;
| ^~~
lang.cpp:9:4: error: 'map' was not declared in this scope
9 | map<int, int> val;
| ^~~
lang.cpp:9:8: error: expected primary-expression before 'int'
9 | map<int, int> val;
| ^~~
lang.cpp:10:29: error: 'chars' was not declared in this scope; did you mean 'char'?
10 | for(int i=0; i<100; i++) chars.insert(a[i]), val[a[i]]++;
| ^~~~~
| char
lang.cpp:10:49: error: 'val' was not declared in this scope
10 | for(int i=0; i<100; i++) chars.insert(a[i]), val[a[i]]++;
| ^~~
lang.cpp:18:15: error: 'chars' was not declared in this scope; did you mean 'char'?
18 | for(int c : chars){
| ^~~~~
| char
lang.cpp:19:14: error: 'val' was not declared in this scope
19 | cd += abs(val[c] - slo[l][c]);
| ^~~
lang.cpp:19:10: error: 'abs' was not declared in this scope
19 | cd += abs(val[c] - slo[l][c]);
| ^~~
lang.cpp:28:16: error: 'chars' was not declared in this scope; did you mean 'char'?
28 | for(char c : chars){
| ^~~~~
| char
lang.cpp:29:33: warning: array subscript has type 'char' [-Wchar-subscripts]
29 | slo[correct] = (slo[correct][c] + val[c]) / 2;
| ^
lang.cpp:29:38: error: 'val' was not declared in this scope
29 | slo[correct] = (slo[correct][c] + val[c]) / 2;
| ^~~