very intersting tutorial , thank u for it but i have one problem , how can i compare a string1 from a file with string2 from another file??

  • create 2 objects of type 'ifstream'
  • open the two files
  • read in the desired stuff to a container of your choice (usually string objects or vectors)
  • compare the two strings
string word1, word2;
ifstream infile1, infile2;


word1 << infile1;
word2 << infile2;

if(word1 == word2)
    cout << "Same";

     cout << "Different";