Problem | descsort |
---|---|
User | WILLI1071A |
Submission Time | 2024-06-19 10:45:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
descsort.cpp: In function ‘int main()’:
descsort.cpp:6:10: error: could not convert ‘n’ from ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘long unsigned int’
6 | int arr[n];
| ^
descsort.cpp:6:10: error: size of array ‘arr’ has non-integral type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
descsort.cpp:7:15: error: no match for ‘operator+’ (operand types are ‘int [1]’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
7 | sort(arr, arr+n);
| ~~~^~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| int [1]
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from des