molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:18:4: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
18 | if(l == u)
| ^
molecules.cpp:29:2: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
29 | vector<struct weights> wts(n);
| ^~~~~~
| std::vector
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
molecules.cpp:29:9: error: expected primary-expression before 'struct'
29 | vector<struct weights> wts(n);
| ^~~~~~
molecules.cpp:32:3: error: 'wts' was not declared in this scope
32 | wts[i] = {w[i], i};
| ^~~
molecules.cpp:34:12: error: 'wts' was not declared in this scope
34 | std::sort(wts.begin(), wts.end(), cmp);
| ^~~