windows file managment vs fstream

This is a discussion on windows file managment vs fstream within the Windows Programming forums, part of the Platform Specific Boards category; for a console application, which would it be best to use fstream or the windows API functions like createfile() and ...

  1. #1
    Registered User whackaxe's Avatar
    Join Date
    Mar 2004
    Posts
    332

    windows file managment vs fstream

    for a console application, which would it be best to use fstream or the windows API functions like createfile() and readfile() etc? what are the pro/cons of each?

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    You get more control with the API functions and it allows you to do special file i/o. fstream is miles easier and is cross platform. If you don't want all the hassle of the API functions and you don't need their advanced features, use fstream. There is basically no speed difference.

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,652
    One is a standardized library which is implemented using the other (on Windows)
    Use whatever suits your needs.

    gg

  4. #4
    Registered User whackaxe's Avatar
    Join Date
    Mar 2004
    Posts
    332
    thanks for the answers. the advacned feautres would be what? copying, moving deleting files etc?

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,652
    Have a look at what CreateFile() can do.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21