I am trying to it to get a user response, search it against the list of pre-defined introductions and return and introduction to the program.. but when I enter hello or any other one, the program crashes. What am I doing wrong, please.




void introduction()
{
char introarray[20][20]=
{
"hi",
"Hi",
"Hello",
"hello",
"hey",
"Hey",
"Yo",
"yo",
};
int i;
for (i = 0; i < 20; i++)
{
int t;
while(strstr(uresponse,introarray[t + 1])!=NULL)
{
cout << "Hello, how are you?.\n";
i = 20;
}
}
};