Thanks in advance.
The premier tool for comparing 2 text files and highlighting their differences is the Unix "diff" utility. It comes free with Linux and most Unix distros. If you do a little web searching, you should be able to find one for Microsoft Windows. Windows comes with a "compare" command-line utility, but I believe it simply checks for equality and doesn't show differences.
If you're using an IDE, some IDEs keep a log of recent changes and have an option to compare your current version with the earlier versions in the log.
Once you commit source code to a Version Control System such as CVS, SVN, or git, the VCS utilities will include a differencing utility.
An IDE is no substitute for an Intelligent Developer.