Ive been having trouble solving this please help, yea its hw but im using this as a last resort as its due in 2 hours.
// Search a dictionary file for the word input by the user.
//
//////////////////////////////////////…
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
int main()
{
string word; // The word entered by the user
string result; // The word read from the file
int counter = 0; // Counts the number of lines read from the file
bool found = false; // If the user's word has been found
ifstream inFile; // The input file
///////////////////////////////////
// Start of your code
//open the dictionary file.
inFile.open("dictionary.txt");
//ask the user to input the word they want to search for.
cout<<"Enter a word to search in dictionary:";
cin>>word;
// Use a while loop to loop through the file.
// Use break to stop the loop if the word is found
// If the word is not found display a message.
if ( found )
cout<<"Word was not found";
// End of your code
///////////////////////////////////
system("pause");
return 0;
}