I am wondering about the meaning of the following lines of code in a header file...
Firstly I have the standard using
which makes a class from a namespace visible to my code
using mynamespace::myclass;
and then a forward declaration of the same class:
namespace mynamespace
{
class myclass;
}
and finally the forward declaration of another class:
class myclass2;
What are the subtle differences for the programmer when "using" and when "forward declaring"? Which is more preferred when writing a header file?