I am comparing two file to find if they have common strings. My program is not doing that and I cannot figure out the reason. Any help is appreciated. Following is my code:
Assuming you can get it to compile, your string comparison in:
if(line1 == line2)
is actually comparing the addresses of line1 and line2, not the array contents.
Try using string objects to store the lines, or use an array comparison method such as strcmp().