Follow the steps,
- Include Header files or name space to access File class.
- Make File class object Depending on your IDE platform ( i.e,
CFile,QFile,fstream).
- Now you can easily find that class methods to open/read/close/getline or else of any file.
CFile/QFile/ifstream m_file;
m_file.Open(path,Other parameter/mood to open file);
For reading file you have to make buffer or string to save data and you can pass that variable in read() method.