Are there any gratis tools to help me compare the differences between two source code files? (for Python, and C++）on Windows 10?
From my answer to this question - two days ago HINT: you can search our site for questions similar to the one that you plan to ask.
Neither of them will handle your
int i; for (i ...) -> for (int i ...) example, but they are open source, so you might give it a try, or request the feature from the author.
• Supports Microsoft Windows XP or newer
• Handles Windows, Unix and Mac text file formats
• Unicode support
• Tabbed interface
• 3-way File Comparison New!
• Visual differencing and merging of text files
• Flexible editor with syntax highlighting, line numbers and word-wrap
• Highlights differences inside lines <= ============================================
• Difference pane shows current difference in two vertical panes
• Location pane shows map of files compared
• Moved lines detection
• Regular Expression based file filters allow excluding and including items
• Fast compare using file sizes and dates
• Compares one folder or includes all subfolders
• Can show folder compare results in a tree-style view
• 3-way Folder Comparison Work in progress
Image Compare New!
• Support many types of images
• Can highlight the differences with blocks
• Overlaying of the pictures is possible
• Creates patch files (Normal-, Context- and Unified formats)
• Resolve conflict files
• Shell Integration (supports 64-bit Windows versions)
• Archive file support using 7-Zip
• Plugin support
• Localizable interface
• Online manual and installed HTML Help manual
There are many good choices for this kind of software. What I'm using on Windows these days is Diffinity. It's gratis (though not open source) and has most of the typical diff tool features people have come to expect. It does folder comparison but not three-way comparison.
One thing I think it does better than most other choices (such as WinMerge) is the Explorer integration. Notice that you can right-click on each file you want to compare and set it as the left or right, respectively:
Once you've selected both left and right in this manner, Diffinity will launch automatically with those selections. As far as I can tell, the context-menu choice for WinMerge only lets you do this for the left file; you still have to select the other one using other means.
Diffinity also uses the visual style where the added or deleted lines are "funnel-highlighted" (like Meld), rather than padding one side or the other with empty lines (like WinMerge):
Whether funneling or padding is better is of course subjective. I prefer Diffinity's highlighting over Meld's (because I find the thick, black arrows in Meld neither attractive nor useful).