foo.cc:42:2: error: expected ';' after class definition
42 | }
| ^
| ;
foo.cc: In member function 'highPre& highPre::operator+(highPre&)':
foo.cc:10:17: error: no matching function for call to 'highPre::highPre()'
10 | highPre c;
| ^
foo.cc:37:5: note: candidate: 'highPre::highPre(std::string&)'
37 | highPre(string & b){
| ^~~~~~~
foo.cc:37:5: note: candidate expects 1 argument, 0 provided
foo.cc:6:7: note: candidate: 'highPre::highPre(const highPre&)'
6 | class highPre{
| ^~~~~~~
foo.cc:6:7: note: candidate expects 1 argument, 0 provided
foo.cc:6:7: note: candidate: 'highPre::highPre(highPre&&)'
foo.cc:6:7: note: candidate expects 1 argument, 0 provided
foo.cc:12:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i = 0; i < a.size() - p.a.size();i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~
foo.cc:13:21: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
13 | p.a.pushback(0);
| ^~~~~~~~
| push_back
foo.cc:17:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for(int i = 0; i < p.a.size() - a.size();i++){
| ~~^~~~~~~~~~~~~~~~~~~~~~~
foo.cc:18:19: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
18 | a.pushback(0);
| ^~~~~~~~
| push_back
foo.cc:21:20: error: declaration of 'int p' shadows a parameter
21 | int k = 0, p = 0;
| ^
foo.cc:22:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(int i = 0; i < a.size(); i++){
| ~~^~~~~~~~~~
foo.cc:23:24: error: 'b' was not declared in this scope
23 | k = a[i] + b[i] + p;
| ^
foo.cc:28:17: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
28 | c.a.pushback(k);
| ^~~~~~~~
| push_back
foo.cc:30:16: warning: reference to local variable 'c' returned [-Wreturn-local-addr]
30 | return c;
| ^
foo.cc:10:17: note: declared here
10 | highPre c;
| ^
foo.cc: In constructor 'highPre::highPre(std::string&)':
foo.cc:39:15: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
39 | a.pushback(b[i]-'0');
| ^~~~~~~~
| push_back
foo.cc: In function 'int main()':
foo.cc:47:16: error: 'highPre::highPre(std::string&)' is private within this context
47 | highPre A(a);
| ^
foo.cc:37:5: note: declared private here
37 | highPre(string & b){
| ^~~~~~~
foo.cc:48:16: error: 'highPre::highPre(std::string&)' is private within this context
48 | highPre B(b);
| ^
foo.cc:37:5: note: declared private here
37 | highPre(string & b){
| ^~~~~~~
foo.cc:50:21: error: 'highPre& highPre::operator+(highPre&)' is private within this context
50 | highPre C = A + B;
| ^
foo.cc:9:14: note: declared private here
9 | highPre& operator+(highPre& p){
| ^~~~~~~~
foo.cc:51:11: error: 'void highPre::put()' is private within this context
51 | C.put();
| ^
foo.cc:32:10: note: declared private here
32 | void put(){
| ^~~
foo.cc:52:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
52 | return;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务