okay so im kind of confused now. . . . . i didn't even have a code to show you cause I know its wrong..I've been absent 2 days on my Programming so its really hard to cope up...i tried researching for ifstream.h and ofstream.h....and so far ifstream.h is for reading a file, and ofstream.h is for writing to a file right??
I got the lab exercise that i missed so I could understand clearly but so far, I understood the ofstream.h.100%(maybe) but no idea ifstream.h..(yea, im using TURBO c++ 4.5 compiler..its really old)
So here's the deal:
What if a problem was to make a program that asks the user for input file(yes, so my inputs are in a file..file to display screen..so its reading to a file right?) with inputs of an arithmetic operator keyword and 2 numbers.(in this case I would want to do simple addition, keyword is "sum")...
Then output(in monitor)..
The sum of (whatever the first input is in the file) and (whatever the second input is in the file) is (the sum of the 2 input file)..
there that's the problem..i got confused because i think i'll need both ofstream.h and ifstream.h...right?...can you please give me a simple code with explanation of it....and I swear this is not an assignment...i just want to cope up with our lesson..Thaks alot! ! !