I am trying this code to perform the following function : given an input file and a word(string) output should be the lines in the file containing the given word along with the line number. But I am getting an error saying "no matching function for call to ..." in the line where I am performing string operation (strstr). Here is my code. Please help me solve this. I am facing the same error in other programs also where ever I perform operations involving strings.

```
#include<iostream>
#include<fstream>
#include<string.h>
#include<stdio.h>
using namespace std;
int main()
{
int x;
char c;
ifstream iFile1, iFile2;
ofstream oFile;
char file1[50], file[50];
char word[50];
cout << "First file?\n";
gets(file1);
std::string str;

cout << "Word?\n";
gets(word);
iFile1.open(file1);

while (std::getline(iFile1, str)) {
    x++;
    if (strstr(str, word)) {
        cout << "%d\t,x";
        cout << str;
    }
}
}

```

error: `no matching function for call to 'strstr(std::string&,char[50])'
 if(strstr(str,word))
 ^`