foo.cc:6:8: error: expected ':' before ';' token
6 | private;
| ^
| :
foo.cc:7:6: error: expected ';' at end of member declaration
7 | int date10];
| ^~~~~~
| ;
foo.cc:7:12: error: expected unqualified-id before ']' token
7 | int date10];
| ^
foo.cc:43:2: error: 'void IntArray::p()' conflicts with a previous declaration
43 | }
| ^
foo.cc:9:6: note: previous declaration 'int IntArray::p'
9 | int p=0;
| ^
foo.cc: In constructor 'IntArray::IntArray(int*, int)':
foo.cc:15:4: error: 'date' was not declared in this scope; did you mean 'date10'?
15 | date[i] = a[i];
| ^~~~
| date10
foo.cc: In member function 'int IntArray::BinSearch2(int, int, int)':
foo.cc:23:6: error: 'date' was not declared in this scope; did you mean 'date10'?
23 | if(date[mid] == x)
| ^~~~
| date10
foo.cc:28:6: error: 'date' was not declared in this scope; did you mean 'date10'?
28 | if(date[mid] > x)
| ^~~~
| date10
foo.cc:33:6: error: 'date' was not declared in this scope; did you mean 'date10'?
33 | if(date[mid] < x)
| ^~~~
| date10
foo.cc: In function 'int main()':
foo.cc:64:5: error: 'class IntArray' has no member named 'P'
64 | A.P();
| ^
foo.cc:63:7: warning: unused variable 'k1' [-Wunused-variable]
63 | int k1 = A.BinSearch2(0, n-1, x);
| ^~
foo.cc: In member function 'int IntArray::BinSearch2(int, int, int)':
foo.cc:22:7: warning: control reaches end of non-void function [-Wreturn-type]
22 | int mid = (left + right)/2;
| ^~~
[Hydro](https://hydro.ac)提供评测服务