Problem sort
User Soysauce
Submission Time 2024-04-17 21:55:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:8:21: error: conversion from ‘long double’ to ‘long unsigned int’ in a converted constant expression
8 | long double arr[N];
| ^
sort.cpp:8:21: error: could not convert ‘N’ from ‘long double’ to ‘long unsigned int’
sort.cpp:8:21: error: size of array ‘arr’ has non-integral type ‘long double’
sort.cpp:10:21: error: invalid types ‘long double [1][long double]’ for array subscript
10 | cin >> arr[i];
| ^
sort.cpp:14:19: error: invalid operands of types ‘long double [1]’ and ‘long double’ to binary ‘operator+’
14 | sort(arr, arr + N);
| ~~~ ^ ~
| | |
| | long double
| long double [1]
sort.cpp:18:22: error: invalid types ‘long double [1][long double]’ for array subscript
18 | cout << arr[i] << " ";