I am facing a error when compiling my c++ code, when hovering over it, it says error:- no operator ">=" matches these operands -- operand types are: std::__cxx11::string >= intC/C++(349).
the code goes like this, its a function in a structure, which takes an array variable from the same structure and runs a loop to check the values in that array is greater or equal to 999,
ERROR IS ON THE LINE - if ((PowerChecker.cpower[a] >= 999)) I AM NOT ALLOWED TO COMPARE ARRAY
customers InputChecker(struct customers PowerChecker)
{
for (int a = 0; a < 4; a++)
{
if ((PowerChecker.cpower[a] >= 999))
{
cout << "Please re-specify the power of your character" << PowerChecker.cpower[a] << endl;
cout << "Power shoudl not Excced Limit 999 " <<endl;
}
}
return (PowerChecker);
}
here is the image of error after compiling
EDIT: SOLVED