#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> nums(4, -1);
cout << nums.size() << endl;
cout << (-1 < nums.size()) << endl;
return 0;
}
In the above code the output is
4
0
I was expecting the output as
4
1
How can the boolean evaluate to 0 as 4 is clearly greater than -1;