I want to mention 2 stream for input and output , normally I have an idea about its use but now I am going to perform it in class, now I am facing errors with cpp file and header which I have not tried before and it seems impossible to solve it. The error appears to be in header and making complain about dummy = int regarding type name and about type specifier. But usually announce streams in this way when not done in class, so there should be a different way for doing in class? I am in doubt about header may be it should be declared myOutStream("string" ) but I am not clear about ios::app that what it should be. I studied about bool that it’s a flag but in my case when I used, it failed to work.
Please someone give me suggestions. https://www.theengineeringprojects.com/2021/10/list-of-ides-to-run-c-programs.html
You don't use L3/L14. L4 opens the file for output. There is a problem with L5 as that opens the same file for reading. If you want to read/write from/to the same file, open it once as fstream (with the appropriate flags - in/out/app etc).
Often you would open the file/test if the file was opened in the constructor as appropriate.