I am writing a software development kit and would like to use as much forward declarations as possible. One of the used classes is std::fstream, but I do not want to include <fstream> in the header files, since I do not want external includes.
However, how to use a forward declaration as the following without using the std notation ? I could use a void* as work-around, but that does not sound like a clean solution.
Qt Code:
class SmallClass; //class std::fstream; is not accepted by the compiler, for obvious reasons class Bigclass { public: ... private: SmallClass* smallObject_; }To copy to clipboard, switch view to plain text mode
Bookmarks