I hane got a class inserted into the namespace:
namespace CPGL
{
class Application;
}
class Application
{
public:
Application()
{
...
}
};
When I tryed to create a pointer this class like this:
CPGL::Application application();
CPGL::Application* app = &application;
Strange and mysterious things are started to happen. Here is the compilation log:
error: cannot convert ‘CPGL::Application (*)()’ to ‘CPGL::Application*’ in initialization
CPGL::Application* app = &application;
The question is how does a link to the class turned to a pointer to the constructor function of this class and how to solve it?