bubblesort2.cpp:3:13: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
3 | int get_cnt(vector<int> curr)
| ^~~~~~
| std::vector
In file included from /usr/include/c++/9/vector:67,
from bubblesort2.h:1,
from bubblesort2.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
bubblesort2.cpp:3:20: error: expected primary-expression before 'int'
3 | int get_cnt(vector<int> curr)
| ^~~
bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:19:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
19 | vector<int> curr(A.size());
| ^~~~~~
| std::vector
In file included from /usr/include/c++/9/vector:67,
from bubblesort2.h:1,
from bubblesort2.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
bubblesort2.cpp:19:12: error: expected primary-expression before 'int'
19 | vector<int> curr(A.size());
| ^~~
bubblesort2.cpp:20:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for(int i = 0; i < A.size(); i++)
| ~~^~~~~~~~~~
bubblesort2.cpp:21:9: error: 'curr' was not declared in this scope
21 | curr[i] = A[i];
| ^~~~
bubblesort2.cpp:22:23: error: 'curr' was not declared in this scope
22 | int cnt = get_cnt(curr);
| ^~~~
bubblesort2.cpp:22:27: error: 'get_cnt' cannot be used as a function
22 | int cnt = get_cnt(curr);
| ^
bubblesort2.cpp:26:25: error: 'get_cnt' cannot be used as a function
26 | answer[j]=get_cnt(curr);
| ^
bubblesort2.cpp:22:9: warning: unused variable 'cnt' [-Wunused-variable]
22 | int cnt = get_cnt(curr);
| ^~~