Problem lunchbox
User Ast8ine
Submission Time 2026-02-20 10:56:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:21:17: error: too many arguments to function ‘std::vector<int> lunch()’
21 | cin >> lunch(i);
| ^
lunchbox.cpp:6:13: note: declared here
6 | vector<int> lunch();
| ^~~~~
lunchbox.cpp:21:7: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘std::vector<int>’)
21 | cin >> lunch(i);
| ~~~ ^~ ~~~~~~~~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/9/iostream:40,
from lunchbox.cpp:1:
/usr/include/c++/9/istream:120:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_