gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:33:15: error: no matching function for call to 'push_back(ll*&)'
33 | arr.pb(a);
| ~~~~~~^~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from gap.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::value_type = long long int]' (near match)
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: conversion of argument 1 would be ill-formed:
gap.cpp:33:16: error: invalid conversion from 'll*' {aka 'long long int*'} to 'std::vector<long long int>::value_type' {aka 'long long int'} [-fpermissive]
33 | arr.pb(a);
| ^
| |
| ll* {aka long long int*}
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from gap.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::value_type = long long int]' (near match)
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: conversion of argument 1 would be ill-formed:
gap.cpp:33:16: error: invalid conversion from 'll*' {aka 'long long int*'} to 'std::vector<long long int>::value_type' {aka 'long long int'} [-fpermissive]
33 | arr.pb(a);
| ^
| |
| ll* {aka long long int*}