Problem | fibo |
---|---|
User | maohaochen |
Submission Time | 2025-09-24 22:34:36 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fibo.cpp: In function ‘int main()’:
fibo.cpp:11:18: error: expected ‘;’ before ‘<’ token
11 | for (int i = 2,i< x;i++){
| ^
| ;
fibo.cpp:11:18: error: expected primary-expression before ‘<’ token
fibo.cpp:12:27: error: class template argument deduction failed:
12 | int nextans = vector(i-1) + vector(i-2);
| ^
fibo.cpp:12:27: error: no matching function for call to ‘vector(int)’
In file included from /usr/include/c++/9/vector:67,
from fibo.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: candidate: ‘template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> std::vector<_ValT, _Allocator>’
1872 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: