Click here to Skip to main content
15,894,405 members
Articles / Desktop Programming / Win32

MeanFileCompare - Text file comparison

Rate me:
Please Sign up or sign in to vote.
4.50/5 (7 votes)
4 Sep 2009CPOL3 min read 33.8K   466   23  
My entry to the Code Lean and Mean File Comparison Contest.
#pragma once

#include "OutputText.h"
#include "CompareFile.h"

class Compare
{
private:
    //
    // The file handles
    //
    CompareFile _compareFile1;
    CompareFile _compareFile2;

    OutputText  _output;

public:
    Compare(void);
    virtual ~Compare(void);

    void CompareFiles(LPCWSTR file1, LPCWSTR file2);

private:
    void FindDifferences();
    void CheckIfFileCompletelyRead(DWORD fileNo);

    static int CompareLinesWithOtherFileLines(CompareFile* compareFile1, CompareFile* compareFile2);

    
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Thank you for voting on my articles!

MCSD.NET in C#


Comments and Discussions