Problem mergevectors
User GohWenXi
Submission Time 2025-06-17 14:53:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mergevectors.cpp: In function ‘int main()’:
mergevectors.cpp:9:2: error: expected initializer before ‘cin’
9 | cin>>lengthA>>lengthB>>vecA>>vecB
| ^~~
mergevectors.cpp:10:18: error: ‘i’ was not declared in this scope
10 | for (int i = 0; i < lengthB; i++){
| ^
mergevectors.cpp:10:22: error: ‘lengthB’ was not declared in this scope; did you mean ‘lengthA’?
10 | for (int i = 0; i < lengthB; i++){
| ^~~~~~~
| lengthA
mergevectors.cpp:13:6: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::vector<long long int>’)
13 | cout<<vecA
| ~~~~^~~~~~
| | |
| | std::vector<long long int>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,