Problem lunchbox
User NotTYR
Submission Time 2023-02-08 21:53:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:14: error: conversion from ‘float’ to ‘long unsigned int’ in a converted constant expression
10 | float array[c];
| ^
lunchbox.cpp:10:14: error: could not convert ‘c’ from ‘float’ to ‘long unsigned int’
lunchbox.cpp:10:14: error: size of array ‘array’ has non-integral type ‘float’
lunchbox.cpp:14:10: error: invalid types ‘float [1][float]’ for array subscript
14 | array[i]=a;
| ^
lunchbox.cpp:16:18: error: invalid operands of types ‘float [1]’ and ‘float’ to binary ‘operator+’
16 | sort(array,array+c);
| ~~~~~^~
| | |
| | float
| float [1]
lunchbox.cpp:20:13: error: invalid types ‘float [1][float]’ for array subscript
20 | b+=array[i];
| ^