I just starting programming, just about a week ago, and I wanted to try and make a Blackjack game.
I wanted to run code using a while
loop, while both hands are less than 21, run some code.
Simple enough.
But, for some reason, the less-than operator isn't working.
Here's the error message:
C2676 binary '<': 'std::vector<int,std::allocator<int>>' does not define this operator or a conversion to a type acceptable to the predefined operator
Can someone help me fix this?
Here's my code:
#include <iostream>
#include <vector>
std::vector<int> handone(0);
std::vector<int> handtwo(0);
int main() {
while (handone < 21 && handtwo < 21) {
}
}