#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
ifstream fin;
char ch[30];
int count = 0;
fin.open("story.txt");
while (!fin.eof())
{
fin>>ch;
if(ch == "the" || ch == "The")
{
count++;
cout<<" "<<ch;
}
}
fin.close();
cout<<" Number of the's in the file : "<<count;
}
Not supposed to use strcompi() function.(or any other functions that could help compare the "ch" with "the")
The count gives zero output because the if condition doesn't work
This is my code, what could be the problem over here.**