Hello,I'm trying to create a function that will accept a character array that the user enters a word or phrase that they want to find in another array that has already been entered.
int search(char searchInput[141]){
cout << "Please enter search text(up to 140 characters): ";
cin.ignore();
cin.getline(searchInput, 141);
bool found = true;
int i;
do
{
for (int i = 0; i<size(Text); i++)
{
for (int j = 0; j < size(searchInput); j++)
{
if (searchInput[j]!=Text[i])
{
found = false;
}
for (int i = 0; i < size(searchInput); i++)
{
if (Text[i] == searchInput[j])
{
found = true;
}
}
}
}
} while (found != true);
return i;
cout << "The text was found at location" << i << endl;
menu();
}