Which is better, using ReadFile/WriteFile or use fstream?

R

Rolf Magnus

monkeydragon said:
Which is better, using ReadFile/WriteFile or use fstream?

Well, the answer for this newsgroup would be fstream, since the other
doesn't exist.
On some systems, there might be something called "ReadFile" and "WriteFile",
but those are not portable. OTOH, they might offer more functionality than
the standard fstream, which is designed as the greatest common denominator
of all the systems that a C++ compiler is available for.
 
M

moonrie

For portability, <fstream> is better, while for other like optimization(if
any), the OS API is better.
Your purpose will give you a better answer.

moonrie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top