Raistlin
5th March 2007, 17:45
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.
class SmallClass;
//class std::fstream; is not accepted by the compiler, for obvious reasons
class Bigclass {
public:
...
private:
SmallClass* smallObject_;
}
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.
class SmallClass;
//class std::fstream; is not accepted by the compiler, for obvious reasons
class Bigclass {
public:
...
private:
SmallClass* smallObject_;
}