This code below is searching name from the string, user has given input of 7 names and then the program asks the user to enter the name, program is then performing search from an array and output the position of the name. The program stops asking user if the user press n otherwise it would continue to ask the user to search. This program is working fine but only finds exact matches. The program should ignore capital character and small character but it is not ignoring. for example array contains the name "JAMES" and I search james it will not give me position . This is my program below please help how to do this. Thanks
#include <iostream>
#include <string>
using namespace std;
int main(){
string str[7];
string search;
for(int i=0; i<7; i++){
cin>>str[i];
}
//searching the string
cout<<endl;
char option;
do{
cout<<"Enter the name to search"<<endl;
cin>>search;
for(int i=0; i<7; i++){
if(str[i]==search){
cout<<search<<" has been found in the "<<i+1<<" Position"<<endl;
}
}
cout<<"Do you want to search another name, press y to continue or n to just quit"<<endl;
cin>>option;
}while(option!='n');
return 0;
}