Input/Output with files

closed account (z6X8T05o)
I tried to make some basic input/output with files in BorlandC++ using ostream and ifstream but it ain't work.

Then, I tried using stuff from C language ( FILE *object_name ) and it works!

Can anyone explain me why code from C works while code from C++ doesn't work?
I know Borland can work for both languages but it just doesn't make sense why they both wouldn't work.

Thanks.
Can you post the code?
You can try to compile few examples from http://www.cplusplus.com/doc/tutorial/files/ and see whether they work with your compiler.
closed account (z6X8T05o)
Yes, I tried with that one first time but....

I HAVEN'T ADDED freaking "using namespace std;" before code!!!

(facepalm)
Topic archived. No new replies allowed.