Problem reading
User dev1634
Submission Time 2023-04-25 12:10:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

reading.cpp: In function ‘int main()’:
reading.cpp:7:18: error: conversion from ‘long double’ to ‘long unsigned int’ in a converted constant expression
7 | long double arr[book];
| ^~~~
reading.cpp:7:18: error: could not convert ‘book’ from ‘long double’ to ‘long unsigned int’
reading.cpp:7:18: error: size of array ‘arr’ has non-integral type ‘long double’
reading.cpp:10:8: error: invalid types ‘long double [1][long double]’ for array subscript
10 | arr[a] = x * y;
| ^
reading.cpp:12:17: error: invalid operands of types ‘long double [1]’ and ‘long double’ to binary ‘operator+’
12 | sort(arr , arr + book);
| ~~~ ^ ~~~~
| | |
| | long double
| long double [1]
reading.cpp:14:11: error: invalid types ‘long double [1][long double]’ for array subscript
14 | if (arr[a] < word) {
| ^