GoConqr has a new look! Let us know what you think.

Module 5 of 10 · Text

Deschidere fisier

Alexandru Țecu

               DESCHIDEREA UNUI FISIER TEXT

 

Pentru a putea efectua operaţii cu un fişier text acesta trebuie mai intâi deschis.Astfel se pot folosi unul din obiectele ifstream(pentru citire) sau ofstrem(pentru scriere) din/în fisier.

•ifstream f("fis.txt"); //s-a deschis fisierul pentru citire

                     SAU

 fstream f("fis.txt",ios::in);

•ofstream f("fis.txt"); //s-a deschis fisierul pentru scriere

                     SAU

fstream f("out.txt",ios::out);

•fstream f("out.txt",ios::app); // s-a deschis fisierul pentru adăugare

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?