WinDiff is a program that comes with Visual C++. WinDiff can be used to compare two files character by character and report the differences to the user.
Starting WinDiff To start WinDiff click start under Windows and select the following menus: In WinDiff you can compare two files by selecting the "Compare Files..." menu option from the "File" menu.
WinDiff will then prompt you for the first file name and then the second file name. This is where you select the files you want to compare.
Select the first file:
Select the second file:
After selecting the files WinDiff will compare the files character by character and tell you if the files are the same or different.
If the files are the same then great!! WinDiff will only tell you the files are the same if every character in both files is the same (including spaces, tabs, linefeeds, etc.). This also means that the files must be of the same length.
The files are different if at least one character differs in the files. This could mean that a character is missing from one file and present in the other (making the files different in length also). Or this could mean that the files are the same length but at a specific position in the files there is a character that is different between the two files. NOTE: WinDiff will tell you if the files differ due to white space (spaces, tabs, etc.) but WinDiff will not tell you where the files differ to white space.
If a file that differs due to non-white space characters then WinDiff will tell you that the files differ and tell you where the files differ.
Here is an example of WinDiff's behavior if files differ:
WinDiff shows a screen similar to the following if the files compared are different.
Let us say the files are the following:
Click the "Expand" button to get the following screen showing where the files differ.
Notice that WinDiff just tells you the line in which the files differ. In this case File 1's lines are highlighted in red to indicate that they differ from File 2's lines that are highlighted in yellow. Notice, also, that according to WinDiff lines 2 and 4 are the same even though they differ by white space.
There is an option in WinDiff to display where files differ due to white space. To enable the option deselect 'Options:Ignore Blanks'. WinDiff will then report white space differences the same way it reports differences due to other characters.
Comparing Files
If Files Are the Same
If Files Are Different
Finding Differences In White Space
Starting WinDiff

Comparing Files



If Files Are the Same
If Files Are Different


File 1
File 2
Finding Differences In White Space