Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 23rd, 2005, 10:02 PM
os008 os008 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 6 os008 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 54 sec
Reputation Power: 0
File Compare

Hi,
i want the best program to compare CPP files, i tried Araxis and Beyond Compare and ExamDiff, all compare good, BUT, the problem is that i want a program which compares the WHOLE file, then gives me the REAL differences, meaning ..., let's say there's a TEST1::TEST2 (int x) and the function is made, then there's another one in the other file but in a different part of the file with the same name and with a slightly different content, i want the program to tell me that there's a function with that name but with different content inside it, u know what i mean? i know it needs a "little" AI :P, but i think it can be made, VC++ actually reads classes and functions and sort them in a drop down menu, so y not a compare program?!

thanks for the help in advance.


NOTE: i have Black Belt in real life btw

Reply With Quote
  #2  
Old March 9th, 2005, 07:39 AM
netytan's Avatar
netytan netytan is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Knighton, UK
Posts: 29 netytan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 7 m 44 sec
Reputation Power: 0
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Quote:
Originally Posted by os008
Hi,
i want the best program to compare CPP files, i tried Araxis and Beyond Compare and ExamDiff, all compare good, BUT, the problem is that i want a program which compares the WHOLE file, then gives me the REAL differences, meaning ..., let's say there's a TEST1::TEST2 (int x) and the function is made, then there's another one in the other file but in a different part of the file with the same name and with a slightly different content, i want the program to tell me that there's a function with that name but with different content inside it, u know what i mean? i know it needs a "little" AI :P, but i think it can be made, VC++ actually reads classes and functions and sort them in a drop down menu, so y not a compare program?!

thanks for the help in advance.


NOTE: i have Black Belt in real life btw


I haven't done a lot in C++ since I'm not very keen on the language, however I'm sure it's possible. There are a bunch of ways to get the differences between files i.e. the diff command on *nix systems or maybe the difflib module in Python.

Both I imagine work in a similar way: read the file and compare the lines. Returning the lines that differ in each.

What I would suggest is that you look at the source for one of these - diff is probably more useful since I believe it's written in C.

If you only need to grab function/class declaration then you should be able to scan the two files and build an array of all the functions & classes - this will take some string processing. You can then compare them?

More generally if you wanted to see if two files were different but didn't care about the differences you could get an MD5 checksum of the two .

Hope this is of some help,

Mark.
Comments on this post
Viper_SB agrees: informative

Reply With Quote
  #3  
Old March 9th, 2005, 08:31 AM
os008 os008 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 6 os008 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 54 sec
Reputation Power: 0
thanks for the help

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > File Compare


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT