Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   help to write C++ code that reads two files and compares them for checking if copied (http://www.go4expert.com/forums/help-write-cpp-code-reads-files-t1747/)

hapa_at_1 29Oct2006 00:02

help to write C++ code that reads two files and compares them for checking if copied
 
i am suppose to write a C++ program that uses end of file while loop but i dont know how to begin with or how to start writing this program
only using string operation or character

write a program that reads data from two file and compares to find out weather one is copied from another and outputs is
as
yes it is copied
no it is not copied

for instance

File 1
Code:

int main ()
{
int y= 1;
y++;        //adding one two y
y--;
// subtraction
return 0;

File 2
Code:

void main ()
{
int number= 1;
number++;      number--;
}


The program that we write should be able to identify that these two program are the same
help i have no clue where to begin writing this program well i know how to open two file and read from them but the comparing part is something a cannot do
the program should ignore all the comments in a file

its urgent this is the only problem i am stuck with


All times are GMT +5.5. The time now is 21:17.