Problem | fenwicktree |
---|---|
User | Daddy |
Submission Time | 2023-11-09 10:26:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fenwicktree.cpp: In function ‘int main()’:
fenwicktree.cpp:14:20: error: no matching function for call to ‘push_back(int*)’
14 | A.push_back(&curr);
| ^
In file included from /usr/include/c++/9/vector:67,
from fenwicktree.cpp:2:
/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:
fenwicktree.cpp:14:15: error: invalid conversion from ‘int*’ to ‘std::vector<int>::value_type’ {aka ‘int’} [-fpermissive]
14 | A.push_back(&curr);
| ^~~~~
| |
| int*
In file included fro