foo.cc: In function ‘int main()’:
foo.cc:25:5: error: ‘vector’ was not declared in this scope
25 | vector<int> a, b;
| ^~~~~~
foo.cc:4:1: note: ‘std::vector’ is defined in header ‘<vector>’; this is probably fixable by adding ‘#include <vector>’
3 | #include <string>
+++ |+#include <vector>
4 | using namespace std;
foo.cc:25:12: error: expected primary-expression before ‘int’
25 | vector<int> a, b;
| ^~~
foo.cc:31:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const std::__cxx11::basic_string<char>::size_type’ {aka ‘const long unsigned int’} [-Wsign-compare]
31 | if (pos != string::npos) da = (int)A.size() - pos - 1;
| ~~~~^~~~~~~~~~~~~~~
foo.cc:34:13: error: ‘a’ was not declared in this scope
34 | a.push_back(cv(c));
| ^
foo.cc:38:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const std::__cxx11::basic_string<char>::size_type’ {aka ‘const long unsigned int’} [-Wsign-compare]
38 | if (pos != string::npos) db = (int)B.size() - pos - 1;
| ~~~~^~~~~~~~~~~~~~~
foo.cc:41:13: error: ‘b’ was not declared in this scope
41 | b.push_back(cv(c));
| ^
foo.cc:44:13: error: ‘a’ was not declared in this scope
44 | reverse(a.begin(), a.end());
| ^
foo.cc:45:13: error: ‘b’ was not declared in this scope
45 | reverse(b.begin(), b.end());
| ^
foo.cc:50:12: error: expected primary-expression before ‘long’
50 | vector<long long> c(na + nb + 1, 0);
| ^~~~
foo.cc:54:29: error: ‘nb’ was not declared in this scope; did you mean ‘na’?
54 | for (int j = 0; j < nb; j++)
| ^~
| na
foo.cc:55:13: error: ‘c’ was not declared in this scope
55 | c[i + j] += 1LL * a[i] * b[j];
| ^
foo.cc:58:34: error: ‘c’ was not declared in this scope
58 | for (int i = 0; i + 1 < (int)c.size(); i++){
| ^
foo.cc:64:19: error: ‘c’ was not declared in this scope; did you mean ‘dc’?
64 | int sz = (int)c.size();
| ^
| dc