I am a beginning C programmer. I am working on a program that opens 2 files, and writes to a 3rd file. There is one common field (code) in the 2 files opened for read "r" purposes.
File 1: Item Name, code, category, price
File 2: # in stock, code
File 3 needs to have:
Code, Item name, # in stock, Total price of inventory in stock.
I am trying to open files 1 and 2.
Then compare the code field.
If they match, move data to file 3.
The biggest problem is the Item Name which string IE: Basketball.
Questions:
What is the best way to move strings, integers, and floats at the same time?
What is the most effective to work with more than 1 file at the same time.
I can send the code that I have, if it would help.
Any words of advise would be greatly appreciated.
Alan