I'd like to have includes just in .cpp files, as I'm working in a project with lots of classes which will have to interact with each other, and I feel it's a bit better since you don't have to worry for what you have already included or not, I just don't know well how to do it; here's an example:
#include "UnitConverter.hpp"
#include <string>
//extern namespace std;
//extern class std::string;
//extern class UnitConverter;
//extern enum UnitConverter::UnitTypes;
//extern enum UnitConverter::UnitSystem;
//extern enum UnitConverter::ScalingType;
class AnalogOutput{
public:
std::string name;
UnitConverter::UnitTypes unit_type;
UnitConverter::UnitSystem unit_system;
UnitConverter::ScalingType scaling_type;
}
how would I declare the namespaces, classes and enum types so that compiles without the includes in the hpp file but in the cpp file?