Posts

Showing posts from December, 2016
For more Computer Science, Linux, C++ content visit ProgrammerCave
Follow us on Facebook | Instagram | Telegram

Contribute on Paypal

C++: Working with files -2

Image
More abo ut open(): File Modes General form of open() function    streamobject.open("filename",mode); The second argument mode specifies the purpose for which the file is opened. The default value of mode are    ios ::in for ifstream function meaning open for reading only    ios ::out for ofstream function open for writing only _________________________________________ File Mode Parameters ios ::app   Appened to end-of-file ios ::ate    Go to end-of-file on opening ios ::binary    Binary file ios :: nocreate   Open fails if file doesn't exist ios :: noreplace   Open files if file already exist ios :: trunc   Delete the contents of file if it exists __________________________________________ File Pointers and their Manipulations Each file has two associated pointers known as file pointer. 1. Input pointer (get pointer) is used for reading the contents of a given file location. 2 . Output point...
For more Computer Science, Linux, C++ content visit ProgrammerCave
Follow us on Facebook | Instagram | Telegram

Contribute on Paypal