Sunday, July 12, 2009

Hiiiii.. help..??c++ programin.???

hii...


can any one plz give me a program or the logic for concatenating two files and comparing two files using c++ programing...(using operator over loading...like A==B for comapring and A+B for concat...)...


thanks alot in adavance....

Hiiiii.. help..??c++ programin.???
Well, you can read the entire file(s) into a std::string and then just use string's operators.





Failing that, you'd make a class called "file" or something. In the constructor you'd take the name of the file to open and read into memory. You'd have a private member that would store the contents of the file.





Then you'd implement operator overloading to define those operations in terms of comparing the private member.
Reply:for concatenate use cncat(srr1,str2)


No comments:

Post a Comment