Is there a way to diff files from C++?

Matt Fichman picture Matt Fichman · Sep 20, 2009 · Viewed 19k times · Source

I'm looking for a C or C++ diff library. I know I can use the Unix diff tool in combination with system or exec, but I really want a library. It would be handy if the library could perform patches as well, like the Unix patch tool.

Answer

Matt Fichman picture Matt Fichman · Sep 24, 2009

I think I've found a good solution, finally:

The DTL - Diff Template Library --- Tutorial

It supports patch. I had to type "diff.cpp" into Google to find it. Hopefully it works!