I would like to change this code
#include <fstream> int main () { std::fstream fs; fs.open ("test.txt", std::fstream::in | std::fstream::out | std::fstream::app); fs << " more lorem ipsum"; fs.close(); return 0; }
-------
To look like this
#include <fstream> int main () { using my_read = std::fstream::in; //<== Error: expected type-specifier std::fstream fs; fs.open ("test.txt", my_read | std::fstream::out; | std::fstream::app); fs << " more lorem ipsum"; fs.close(); return 0; }
What am I doing wrong?
Thanks in advance for your help