N
none
I have this code:
namespace second {
class Processor {
public:
};
}
namespace first {
namespace second {
class Factory {
public:
void setup(){
Processor processor;
}
};
}
}
int main() {
// will not compile!
first::second::Factory factory;
return 0;
}
Is there any way to instansiate 'Processor' in the class 'Factory' without having to change (adding
the outer namespace 'first') Processor to:
namespace first {
namespace second {
class Processor {
public:
};
}
}
??
namespace second {
class Processor {
public:
};
}
namespace first {
namespace second {
class Factory {
public:
void setup(){
Processor processor;
}
};
}
}
int main() {
// will not compile!
first::second::Factory factory;
return 0;
}
Is there any way to instansiate 'Processor' in the class 'Factory' without having to change (adding
the outer namespace 'first') Processor to:
namespace first {
namespace second {
class Processor {
public:
};
}
}
??