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

Discussion in 'C++' started by monkeydragon, Dec 18, 2005.

  1. monkeydragon

    monkeydragon Guest

    Which is better, using ReadFile/WriteFile or use fstream?
     
    monkeydragon, Dec 18, 2005
    #1
    1. Advertising

  2. monkeydragon

    Rolf Magnus Guest

    monkeydragon wrote:

    > 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.
     
    Rolf Magnus, Dec 18, 2005
    #2
    1. Advertising

  3. monkeydragon

    moonrie Guest

    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

    "monkeydragon" <>
    ??????:...
    > Which is better, using ReadFile/WriteFile or use fstream?
    >
     
    moonrie, Dec 18, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. .Net Sports
    Replies:
    0
    Views:
    489
    .Net Sports
    Jan 11, 2006
  2. .Net Sports
    Replies:
    11
    Views:
    1,474
    .Net Sports
    Jan 17, 2006
  3. charly
    Replies:
    5
    Views:
    1,291
    charly
    Apr 23, 2004
  4. Armando
    Replies:
    6
    Views:
    778
    Armando
    Jan 29, 2004
  5. salsipius

    Help with ReadFile()

    salsipius, Oct 11, 2005, in forum: C++
    Replies:
    2
    Views:
    2,274
    John Harrison
    Oct 12, 2005
Loading...

Share This Page