Problem weddingcoins
User beefburger
Submission Time 2026-02-18 16:19:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

weddingcoins.cpp: In function ‘int main()’:
weddingcoins.cpp:26:21: error: invalid initialization of reference of type ‘std::vector<int>&’ from expression of type ‘std::vector<float>’
26 | amt = findClosest(money, n);
| ^~~~~
weddingcoins.cpp:5:30: note: in passing argument 1 of ‘int findClosest(std::vector<int>&, int)’
5 | int findClosest(vector<int>& v, int target) {
| ~~~~~~~~~~~~~^