Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:26:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
26 | ans.pb(ask[i]);
| ^
Xoractive.cpp:26:18: error: no matching function for call to 'push_back(int (&)(int))'
26 | ans.pb(ask[i]);
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Xoractive.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]' <near match>
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: conversion of argument 1 would be ill-formed:
Xoractive.cpp:26:17: error: invalid conversion from 'int (*)(int)' to 'std::vector<int>::value_type' {aka 'int'} [-fpermissive]
26 | ans.pb(ask[i]);
| ~~~~~^
| |
| int (*)(int)
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from Xoractive.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]' <near match>
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: conversion of argument 1 would be ill-formed:
Xoractive.cpp:26:17: error: invalid conversion from 'int (*)(int)' to 'std::vector<int>::value_type' {aka 'int'} [-fpermissive]
26 | ans.pb(ask[i]);
| ~~~~~^
| |
| int (*)(int)