the task for checking the priority string is not working i have included string header file of cstring but still. i want to check whether the input inserted by user is in the case which i have provided or else it should ask again to enter the priority. but when i am running it is not doing in the same way i want it to be.
void add_task(){
bool check=true;
system("color 4F");
cout<<"Enter the task: ";
getline(cin,task);
do{
cout<<endl<<"Priority(High/Medium/Low) : ";
gets(priority);
**code to check whether the priority order is correct??**
if (strcmpi(priority,"High") == true) {
check=true;
break;
//comparing text
}
else if(strcmpi(priority,"Medium") == true ){
check=true;
break;
}
else if(strcmpi(priority,"Low") == true){
check=true;
break;
}
else {
check=false;
cout<<endl<<"Please enter Correctly";
}
}
while (check==false);
cout<<endl<<"Due in days: ";
cin>>due;
}