I just wondered if anyone had any tricks or programs they used when comparing two of the same file but different versions?

I appear to have foolishly made a modification at some point today (Went a few hours without running any tests) and it has stopped the whole project working - without throwing up any errors so it must be subtle whatever I have done. I just thought that there must be a program out there that might highlight differences etc.

Otherwise, a step by step search might be in order!

3 Answers 3


Are you familiar with diff tools? Tools such as KDiff, WinDiff, BeyondCompare... they will all compare files and highlight differences. What IDE are you using? Some IDEs (such as Eclipse) have integrated diff tools. Some version control tools also have built-in diff tools (MKS comes to mind). For quick-and-dirty compares, I use Notepad++ which has a comparison plugin. It's a great and free general purpose text editor and the compare can be done on two buffers, you don't even have to load files so it's as simple as copying and pasting two versions of the file in question!

  • Hi, I doing development on an embedded device (ARM) so I am using the Programmers Notepad that came bundled with the WinARM compiler. I have used Eclipse before, I will have a look at that and the others you've mentioned. Thanks
    – Draineh
    Commented Mar 18, 2011 at 14:05
  • @Draineh: In Eclipse, right-click the file, choose "Compare With" to compare the file to prior versions of itself - this will only work in Eclipse since it has some kind of internal revsion history for files. Otherwise, you could export the text to the C files to Windows and use WinDiff or something like that on them. Commented Mar 18, 2011 at 14:08

Look up diff or merge. If you are on windows WinMerge is a fantastic free diff/merge software.

Also, why is your source control not able to report the differences?

  • Ah, yes I didn't explain this. As I am currently using a fairly limited IDE and on a windows system - Also as I work from multiple workstations without access to a central server I am using DropBox to backup and store copies of historical files
    – Draineh
    Commented Mar 18, 2011 at 14:07
  • @Draineh: My home projects are in Mercurial, and the base repository (what I clone, push, and pull for the local ones) is in my DropBox account. The local repositories function well on Windows and Linux (I haven't done much development on my Mac). Commented Mar 18, 2011 at 14:39

If you have source control, there should be a diff/compare function provided.

If you aren't using source control, use Beyond Compare. If is free (though you'll get a pop-up asking you to buy after a few weeks) and it's the best compare software I've found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.