'fstream' does not name a type
Hello,
I have included fstream in my file (#include <fstream>) In the file, I have a class declaration and a private variable static fstream fileStopWatch ; Then I am getting the error "'fstream' does not name a type" It was working in gcc version 4.1.2 20080704 (Red Hat 4.1.2-48) but not working in gcc version 4.4.4 (GCC) ex: class Utility { .. .. private: static fstream fileStopWatch ; .. .. }; Please suggest a solution for the above problem. Regards, Harish |
The error means that it cannot find a type named fstream. This is happening because fstream is in the std namespace. Try the following instead:
Code:
class Utility |
Hello,
Thanks a lot for your response. The change worked. Regards, Harish |
All times are GMT -5. The time now is 11:59 PM. |