I have a class NormalCalculator. Within NormalCalculator, I have defined a struct GLpoint.
As my project has progressed, I have found uses for GLpoint elsewhere in my code, but I find it untidy and screen-polluting to have to write NormalCalculator::GLpoint every time I wish to use the GLpoint struct elsewhere in my solution, outside of the NormalCalculator class.
Is there any way I can let the compiler know that GLpoint exists in NormalCalculator.h, and for it to just let me refer to it as GLpoint? I’m pretty sure there should be a way.
I’ve tried
using NormalCalculator
and
using NormalCalculator::GLpoint
as expected, these didn’t work as NormalCalculator is a class and not a namespace.
1 Answer