Strstr() in with 2d and 1d array in c++

please help I am using strstr()between 2d and 1d char array
example >>2Darray a(input)
DELHI>> a[0]
MUMBAI >>a[1]
1D char array ARRAYb (input)>>HI
ONLY COMPARE a[0] of 2d and b

#include
using namespace std;
#include <string.h>
int main() {
int k;
char a[k][50];
for(int i=0;i<k;i++){
scanf("%s",&a[i][0]);//
}
char b[100];
cin>>b;
char *p = strstr(a[0], b);
if§{
cout<<“yes”;
}
else
cout<<“no”;
return 0;
}

Please either format your code - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

Thanks for your time ,I found the error .:grinning:

1 Like