Problem brick
User wrizz69
Submission Time 2023-04-21 14:31:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int32_t main()’:
brick.cpp:18:23: error: invalid use of non-static member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
18 | v.push_back(v.size);
| ~~^~~~
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from brick.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:915:7: note: declared here
915 | size() const _GLIBCXX_NOEXCEPT
| ^~~~