Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: Fast way to compare two files using STL?

Reply
Thread Tools

Re: Fast way to compare two files using STL?

 
 
Thomas Matthews
Guest
Posts: n/a
 
      08-18-2003
John Villalovos wrote:

> I was wondering if people had any ideas on a fast way to compare two files (on
> Linux) using the STL.

Files are in the domain of the operating system.
Operating systems should be very good at copying and comparing files.
Use either a system command:
system("diff file_a file_b > results")
or system specific functions.

Also, there are a plethora of file compare utilities. Check them
out.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

 
Reply With Quote
 
 
 
 
John Villalovos
Guest
Posts: n/a
 
      08-18-2003
In article <MG50b.26708$(E-Mail Removed) om>,
Thomas Matthews <(E-Mail Removed)> wrote:
>John Villalovos wrote:
>
>> I was wondering if people had any ideas on a fast way to compare two files
>> (on Linux) using the STL.

>Files are in the domain of the operating system.
>Operating systems should be very good at copying and comparing files.
>Use either a system command:
> system("diff file_a file_b > results")
>or system specific functions.
>
>Also, there are a plethora of file compare utilities. Check them
>out.


Thanks.

I'll be honest and say, Yuck! I don't like writing code which does a
"system()" call. Must be my personality But you are right in that diff
works well and is quite fast.

John
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compare two SOAP Envelope or two Document or two XML files GenxLogic Java 3 12-06-2006 08:41 PM
Best way to compare two XML files for equivalence (subset) Tim Smith XML 0 09-29-2004 05:17 AM
Re: Fast way to compare two files using STL? John Villalovos C++ 0 08-18-2003 04:25 PM
Re: Fast way to compare two files using STL? Gianni Mariani C++ 1 08-16-2003 11:34 AM
Re: Fast way to compare two files using STL? Kevin Goodsell C++ 0 08-16-2003 01:04 AM



Advertisments