i am doing on this project but i could not get it done n i am really lost. here is the problem: read input from a Products.txt file, which has the format of ProductId, ProductName, Cost, SalesPrice, Qoh, VendorName, and PurchaseDay. Another file called PriceUpdate.txt, your program should use this file to update the product pricing. As the result, your program will create a new file that has updated pricing information for all products; you can name this new file ProductsUpdate.txt. And all the error messages should be written on the other file called Errors.txt. the files Priceupdate.txt has only productId and Cost. I do not know how to use this file to compare it with the first one. I tried to use structure with array but i could not do it. I could read in the first file but do not know how to write a code to compare. Can any of you guys in here help me out? or give me some hints for how to solve this problem? thanks a lot!
here is a code for the first n second file that i wrote:
{
char read_in;
fin.get(read_in);
while(! fin.eof())
{
cout.put(read_in);
fin.get(read_in);
}
{
char read_in_second;
fin2.get(read_in_second);
while(! fin2.eof())
{
cout.put(read_in_second);
fin2.get(read_in_second);
}
here is a code for the first n second file that i wrote:
{
char read_in;
fin.get(read_in);
while(! fin.eof())
{
cout.put(read_in);
fin.get(read_in);
}
{
char read_in_second;
fin2.get(read_in_second);
while(! fin2.eof())
{
cout.put(read_in_second);
fin2.get(read_in_second);
}