foo.cc: In function 'std::string multiply(const std::string&, const std::string&)':
foo.cc:12:10: error: 'vector' is not a member of 'std'
12 | std::vector<int> result(len1 + len2, 0);
| ^~~~~~
foo.cc:3:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
2 | #include <string>
+++ |+#include <vector>
3 | // 高精度乘法
foo.cc:12:17: error: expected primary-expression before 'int'
12 | std::vector<int> result(len1 + len2, 0);
| ^~~
foo.cc:22:13: error: 'result' was not declared in this scope
22 | result[currPos] += product % 10;
| ^~~~~~
foo.cc:35:26: error: 'result' was not declared in this scope
35 | while (index >= 0 && result[index] == 0) {
| ^~~~~~
foo.cc:40:39: error: 'result' was not declared in this scope
40 | finalResult += std::to_string(result[index]);
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务